diff --git a/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx b/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx index 07b51b22..b9e28b74 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx @@ -1,5 +1,5 @@ import { getDictionary } from '@/dictionaries' -import { Lang, locales } from '@/dictionaries/locales' +import { locales } from '@/dictionaries/locales' import { AuctionBids } from '@/components/routes/project/auction/auction-bids' import { AuctionDataCard } from '@/components/routes/project/auction/auction-data-card' import { ProjectHeader } from '@/components/routes/project/project-header' @@ -18,6 +18,7 @@ import { getProjects } from '@/lib/projects' import { redirect } from 'next/navigation' +import { ProjectPageProps, ProjectPageParams } from '@/types/routing.type' export default async function AuctionPage({ params }: ProjectPageProps) { const dict = await getDictionary(params.lang) @@ -73,8 +74,3 @@ export async function generateStaticParams(): Promise { return params } - -type ProjectPageParams = { project: string; lang: Lang } -type ProjectPageProps = { - params: ProjectPageParams -} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts b/apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts new file mode 100644 index 00000000..777efd9c --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts @@ -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 { + 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() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx b/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx index d31400a2..f4de8194 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx @@ -1,9 +1,9 @@ import { getDictionary } from '@/dictionaries' -import { Lang } from '@/dictionaries/locales' +import { ProjectPageProps, ProjectPagePropsWithChildren } from '@/types/routing.type' import { getProjectBySlug } from '@/lib/projects' import { Metadata } from 'next' -export default function ProjectPagesLayout({ children }: ProjectPageProps) { +export default function ProjectPagesLayout({ children }: ProjectPagePropsWithChildren) { return children } @@ -20,8 +20,3 @@ export async function generateMetadata({ } } } -interface ProjectPageProps { - children: React.ReactNode - params: ProjectPageParams -} -type ProjectPageParams = { project: string; lang: Lang } diff --git a/apps/webapp/app/(routes)/[lang]/[project]/page.tsx b/apps/webapp/app/(routes)/[lang]/[project]/page.tsx index 370b82b0..37afd740 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/page.tsx @@ -8,10 +8,11 @@ import { Countdown } from '@/components/shared/countdown' import Link from 'next/link' import dynamic from 'next/dynamic' import { Button } from '@/components/ui/button' -import { Lang, locales } from '@/dictionaries/locales' +import { locales } from '@/dictionaries/locales' import { getDictionary } from '@/dictionaries' import { appConfig } from '@/lib/config' import Image from 'next/image' +import { ProjectPageProps, ProjectPageParams } from '@/types/routing.type' export default async function ProjectPage({ params }: ProjectPageProps) { const dict = await getDictionary(params.lang) @@ -130,11 +131,6 @@ export async function generateStaticParams(): Promise { return params } -type ProjectPageParams = { project: string; lang: Lang } -type ProjectPageProps = { - params: ProjectPageParams -} - const DynamicAddressForm = dynamic( () => import('../../../../components/routes/project/register-address-form').then( diff --git a/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx b/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx index 72ad4cd1..f7c340a8 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx @@ -5,7 +5,7 @@ import { Card, CardContent } from '@/components/ui/card' import { Countdown } from '@/components/shared/countdown' import { ProjectPresaleData } from '@/components/routes/project/project-presale-data' import { PresaleTransactionsCard } from '@/components/routes/project/presale/presale-transactions-card' -import { Lang } from '@/dictionaries/locales' +import { ProjectPageProps } from '@/types/routing.type' import { getDictionary } from '@/dictionaries' import { PresaleDepositCard } from '@/components/routes/project/presale/presale-deposit-card' @@ -36,7 +36,3 @@ export default async function ProjectPage({ params }: ProjectPageProps) { ) } - -type ProjectPageProps = { - params: { project: string; lang: Lang } -} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts b/apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts new file mode 100644 index 00000000..f140d8c2 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts @@ -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 { + 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() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/[project]/sitemap.ts new file mode 100644 index 00000000..ce5dcd70 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/[project]/sitemap.ts @@ -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 { + 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() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts new file mode 100644 index 00000000..c5ab989b --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/ai-startups`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts new file mode 100644 index 00000000..7b9d0701 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/bitcash-app`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts new file mode 100644 index 00000000..a7de9fe9 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/communities`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts new file mode 100644 index 00000000..135bd3cc --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/daos-dboard`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts new file mode 100644 index 00000000..cdc1e70a --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/investors`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts new file mode 100644 index 00000000..6f35f9a5 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/referrals`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx index c959e65f..50ab1875 100644 --- a/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx @@ -76,4 +76,4 @@ export async function generateStaticParams(): Promise { } type ArticlePageParams = { lang: Lang; category: string; slug: string } -type ArticlePageProps = { params: ArticlePageParams } +export type ArticlePageProps = { params: ArticlePageParams } diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts new file mode 100644 index 00000000..e0e0ed8f --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts @@ -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 { + 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() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx b/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx index da788822..d3e9b554 100644 --- a/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx @@ -70,4 +70,4 @@ export async function generateMetadata(props: any): Promise { } type CategoryPageParams = { lang: Lang; category: string } -type CategoryPageProps = { params: CategoryPageParams } +export type CategoryPageProps = { params: CategoryPageParams } diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts new file mode 100644 index 00000000..f00a2da9 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts @@ -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 { + 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() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/blog/sitemap.ts b/apps/webapp/app/(routes)/[lang]/blog/sitemap.ts new file mode 100644 index 00000000..2735e869 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/blog/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/blog`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts b/apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts new file mode 100644 index 00000000..13712b59 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/in/early-access`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/batch-auctions/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/batch-auctions/sitemap.ts new file mode 100644 index 00000000..09041f4d --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/batch-auctions/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/batch-auctions`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts new file mode 100644 index 00000000..2e092e5c --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/developers`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/media/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/media/sitemap.ts new file mode 100644 index 00000000..63437ec4 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/media/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/media`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/security/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/security/sitemap.ts new file mode 100644 index 00000000..28a0a6fd --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/security/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/security`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts new file mode 100644 index 00000000..73c37a63 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/tokenization`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/legal/privacy/sitemap.ts b/apps/webapp/app/(routes)/[lang]/legal/privacy/sitemap.ts new file mode 100644 index 00000000..c157fc14 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/legal/privacy/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/legal/privacy`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/legal/terms/sitemap.ts b/apps/webapp/app/(routes)/[lang]/legal/terms/sitemap.ts new file mode 100644 index 00000000..788ddb67 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/legal/terms/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/legal/terms`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/sitemap.ts new file mode 100644 index 00000000..678d2554 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts b/apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts new file mode 100644 index 00000000..4c03c416 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/wallet`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts b/apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts new file mode 100644 index 00000000..11328434 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/whitepaper`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/sitemap.ts b/apps/webapp/app/sitemap.ts index b0866080..32ac6312 100644 --- a/apps/webapp/app/sitemap.ts +++ b/apps/webapp/app/sitemap.ts @@ -1,6 +1,6 @@ import { MetadataRoute } from 'next' -export default function sitemap(): MetadataRoute.Sitemap { +export default async function sitemap(): Promise { return [ { url: 'https://bitlauncher.ai', diff --git a/apps/webapp/package.json b/apps/webapp/package.json index 3ff48dc9..0fd6e20a 100644 --- a/apps/webapp/package.json +++ b/apps/webapp/package.json @@ -109,6 +109,7 @@ "@types/uuid": "^10.0.0", "@typescript-eslint/parser": "^7.17.0", "autoprefixer": "^10.4.19", + "encoding": "^0.1.13", "eslint-config-next": "^14.2.5", "eslint-config-prettier": "^9.1.0", "eslint-plugin-tailwindcss": "^3.17.4", diff --git a/apps/webapp/types/routing.type.ts b/apps/webapp/types/routing.type.ts index bb790b32..31c24f55 100644 --- a/apps/webapp/types/routing.type.ts +++ b/apps/webapp/types/routing.type.ts @@ -9,3 +9,15 @@ export interface CommonPageParams extends LangProp {} export interface CommonPageProps { params: CommonPageParams } + +export interface ProjectPageParams extends CommonPageParams { + project: string; +} + +export interface ProjectPageProps { + params: ProjectPageParams +} + +export interface ProjectPagePropsWithChildren { + children: React.ReactNode +} \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 446a1344..670be810 100755 Binary files a/bun.lockb and b/bun.lockb differ