Make @/ match v1

This commit is contained in:
Samy Pessé
2025-02-01 19:55:19 +01:00
parent 9eca010f94
commit 8df1bf152b
8 changed files with 14 additions and 14 deletions
@@ -1,5 +1,5 @@
import { SiteContentLayout } from '@/components/routes/SiteContentLayout';
import { createDynamicSiteContext } from '@/lib/context';
import { SiteContentLayout } from '@v2/components/routes/SiteContentLayout';
import { createDynamicSiteContext } from '@v2/lib/context';
export default async function RootLayout({
params,
@@ -1,5 +1,5 @@
import { SiteContentPage } from '@/components/routes/SiteContentPage';
import { createDynamicSiteContext } from '@/lib/context';
import { SiteContentPage } from '@v2/components/routes/SiteContentPage';
import { createDynamicSiteContext } from '@v2/lib/context';
export default async function Page({ params }: { params: Promise<{ url: string[] }> }) {
const { url } = await params;
@@ -1,7 +1,7 @@
import { unstable_cacheTag as cacheTag } from 'next/cache';
import { SiteContentLayout } from '@/components/routes/SiteContentLayout';
import { getSiteCacheTag } from '@/lib/cache';
import { createStaticSiteContext } from '@/lib/context';
import { SiteContentLayout } from '@v2/components/routes/SiteContentLayout';
import { getSiteCacheTag } from '@v2/lib/cache';
import { createStaticSiteContext } from '@v2/lib/context';
export default async function RootLayout({
params,
@@ -1,7 +1,7 @@
import { unstable_cacheTag as cacheTag } from 'next/cache';
import { createStaticSiteContext } from '@/lib/context';
import { getSiteCacheTag } from '@/lib/cache';
import { SiteContentPage } from '@/components/routes/SiteContentPage';
import { createStaticSiteContext } from '@v2/lib/context';
import { getSiteCacheTag } from '@v2/lib/cache';
import { SiteContentPage } from '@v2/components/routes/SiteContentPage';
export default async function Page({ params }: { params: Promise<{ url: string[] }> }) {
'use cache';
@@ -1,4 +1,4 @@
import { GitBookSiteContext } from '@/lib/context';
import { GitBookSiteContext } from '@v2/lib/context';
/**
* Layout component to render the site content.
@@ -1,4 +1,4 @@
import { GitBookSiteContext } from '@/lib/context';
import { GitBookSiteContext } from '@v2/lib/context';
export async function SiteContentPage({ context }: { context: GitBookSiteContext }) {
const { api } = context;
+1 -1
View File
@@ -1,7 +1,7 @@
import { headers } from 'next/headers';
import { redirect } from 'next/navigation';
import { GitBookAPI } from '@gitbook/api';
import { GITBOOK_API_TOKEN, GITBOOK_API_URL, GITBOOK_USER_AGENT } from '@/lib/env';
import { GITBOOK_API_TOKEN, GITBOOK_API_URL, GITBOOK_USER_AGENT } from '@v2/lib/env';
/**
* Generic context about rendering content.
+1 -1
View File
@@ -19,7 +19,7 @@
}
],
"paths": {
"@/*": ["./src/*"],
"@v2/*": ["./src/*"],
"@v1/*": ["../gitbook/src/*"]
}
},