diff --git a/app/page.tsx b/app/page.tsx index 3c7303b..a8dd538 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,119 +1,12 @@ import type { Metadata } from "next"; -import { promises as fs } from "node:fs"; -import path from "node:path"; +import { redirect } from "next/navigation"; export const metadata: Metadata = { - title: "AdConsole", - description: "Amazon PPC teaching simulator", + title: "AdConsole - Amazon PPC Simulator", + description: "Amazon PPC teaching simulator - Migrating to React", }; -async function getLegacyStats() { - try { - const filePath = path.join(process.cwd(), "public", "adconsole.html"); - const stat = await fs.stat(filePath); - return { - bytes: stat.size, - kb: Math.round(stat.size / 1024), - modified: stat.mtime.toLocaleString("sv-SE"), - }; - } catch (e) { - if (process.env.NODE_ENV !== "production") { - console.warn("adconsole.html not found:", e); - } - return null; - } -} - export default async function Home() { - const stats = await getLegacyStats(); - - return ( -
-
-
- - - Next.js shell ready - -

- AdConsole -

-

- Amazon PPC teaching simulator. The legacy static page is preserved - at /adconsole.html{" "} - while we port it into React components. Pick a path below to keep - moving. -

-
- -
- -
-

- Open legacy page -

- - → - -
-

- Jump straight into the original AdConsole HTML — works exactly as - before, no rebuild required. -

- {stats && ( -
-
-
Size
-
- {stats.kb} KB -
-
-
-
Last modified
-
- {stats.modified} -
-
-
- )} -
- -
-

- Build the React port -

-

- Start migrating the simulator into app/{" "} - route by route. The static HTML is the source of truth until the - port lands. -

-
    -
  • - - app/page.tsx — landing shell -
  • -
  • - - app/simulator/page.tsx — main UI (TBD) -
  • -
  • - - public/adconsole.html — legacy reference -
  • -
-
-
- - -
-
- ); + // Redirect directly to the legacy tool + redirect("/adconsole.html"); } diff --git a/public/adconsole.html b/public/adconsole.html index 4c2de51..e07211b 100644 --- a/public/adconsole.html +++ b/public/adconsole.html @@ -546,6 +546,11 @@ +
+ Migration in Progress: This simulator is being migrated to React. + View the new React version on GitHub → +
+