get all urls strapi integration
This commit is contained in:
1 parent
87f4f6a1b8
commit
5ccec9e2ba
2 files changed
+11
-4
No files matched your search
@@ -3,6 +3,12 @@ import { IPage, PageCardDto, Token } from "@/types";
|
||||
import { asItem } from "./lib";
|
||||
import { StrapiComponent, StrapiHome, StrapiPage, StrapiPageCard } from "./types";
|
||||
|
||||
export function createPageUrls(pages: StrapiPage[]) {
|
||||
return {
|
||||
items: pages.map(page => page.slug),
|
||||
}
|
||||
}
|
||||
|
||||
export function createPageTokens(components: StrapiComponent[]): Token[] {
|
||||
return components.map(component => {
|
||||
switch (component.__component) {
|
||||
|
||||
Reference in new issue
Block a user