generated from blockmatic-icebox/powerstack
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add sitemap * fix: error handling * fix: move common types * fix: update base url in sitemap * Update apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Update apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Update apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * fix: build error * fix: remove unnecessary async declarative * vendor: add @types/uuid * fix: remove console log for debug * fix: add 'async' to all sitemaps * fix: make ProjectPageParams extends CommonPageParams --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
0859420
commit 31a5ce9
Showing
31 changed files
with
350 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { MetadataRoute } from 'next' | ||
import { getDictionary } from '@/dictionaries' | ||
import { getProjects } from '@/lib/projects' | ||
import { ProjectPageProps } from '@/types/routing.type' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: ProjectPageProps): Promise<MetadataRoute.Sitemap> { | ||
const dict = await getDictionary(params.lang) | ||
const projects = await getProjects(dict) | ||
|
||
return projects.map(project => ({ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/${project.slug}/auction`, | ||
lastModified: new Date() | ||
})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { MetadataRoute } from 'next' | ||
import { getDictionary } from '@/dictionaries' | ||
import { getProjects } from '@/lib/projects' | ||
import { ProjectPageProps } from '@/types/routing.type' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: ProjectPageProps): Promise<MetadataRoute.Sitemap> { | ||
const dict = await getDictionary(params.lang) | ||
const projects = await getProjects(dict) | ||
|
||
return projects.map(project => ({ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/${project.slug}/presale`, | ||
lastModified: new Date() | ||
})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { MetadataRoute } from 'next' | ||
import { getDictionary } from '@/dictionaries' | ||
import { getProjects } from '@/lib/projects' | ||
import { ProjectPageProps } from '@/types/routing.type' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: ProjectPageProps): Promise<MetadataRoute.Sitemap> { | ||
const dict = await getDictionary(params.lang) | ||
const projects = await getProjects(dict) | ||
|
||
return projects.map(project => ({ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/${project.slug}`, | ||
lastModified: new Date() | ||
})) | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/about/ai-startups`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/about/bitcash-app`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/about/communities`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/about/daos-dboard`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/about/investors`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/about/referrals`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { MetadataRoute } from 'next' | ||
import { getBlogCategoryLandingData } from '@/services/datocms' | ||
import { ArticlePageProps } from './page' | ||
|
||
export default async function sitemap( | ||
props: ArticlePageProps | ||
): Promise<MetadataRoute.Sitemap> { | ||
const { | ||
params: { lang, category } | ||
} = props | ||
const data = await getBlogCategoryLandingData(lang, category) | ||
if (!data) return [] | ||
|
||
const { sections } = data | ||
if (!sections) return [] | ||
|
||
const slugs = sections.map((section: any) => section.slug) | ||
|
||
return slugs.map((slug: any) => ({ | ||
url: `https://${process.env.VERCEL_URL}/${lang}/blog/${category}/${slug}`, | ||
lastModified: new Date() | ||
})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { MetadataRoute } from 'next' | ||
import { getArticleSections } from '@/services/datocms' | ||
import { CategoryPageProps } from './page' | ||
|
||
export default async function sitemap( | ||
props: CategoryPageProps | ||
): Promise<MetadataRoute.Sitemap> { | ||
const { | ||
params: { lang } | ||
} = props | ||
let sections = []; | ||
try { | ||
sections = await getArticleSections(lang); | ||
} catch (error) { | ||
return []; | ||
} | ||
|
||
const categories = sections.map(section => section.slug) | ||
return categories.map(category => ({ | ||
url: `https://${process.env.VERCEL_URL}/${lang}/blog/${category}`, | ||
lastModified: new Date() | ||
})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/blog`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/in/early-access`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/learn/batch-auctions/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/batch-auctions`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/developers`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/media`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/security`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/tokenization`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CommonPageProps } from '@/types/routing.type' | ||
import { MetadataRoute } from 'next' | ||
|
||
export default async function sitemap({ | ||
params | ||
}: CommonPageProps): Promise<MetadataRoute.Sitemap> { | ||
return [ | ||
{ | ||
url: `https://${process.env.VERCEL_URL}/${params.lang}/legal/privacy`, | ||
lastModified: new Date() | ||
} | ||
] | ||
} |
Oops, something went wrong.