diff --git a/frontend/components/overview.tsx b/frontend/components/overview.tsx index 20756cf..6bd26f5 100644 --- a/frontend/components/overview.tsx +++ b/frontend/components/overview.tsx @@ -1,105 +1,65 @@ import Image from "next/image"; import Connect from "../public/connect-icon.svg"; import Switchboard from "../public/switchboard-icon.svg"; +import Fusion from "../public/fusion-icon.png"; import Link from "next/link"; -export default function Overview({ name }: { name: string }) { +import { Environment } from "../pages"; +export default function Overview({ name, env }: { name: string; env: Environment }) { return ( -
+
-

+

{name}

-
-
-

Prod

-
-
-
- MakerDAO -
-

- - - Connect - -

+ +
+ {Object.keys(env).map((envName) => ( +
+
+

{envName}

-
-
- MakerDAO -
-

- - - Switchboard - -

-
-
-
-
-
-
-

Stage

-
-
-
- MakerDAO -
-

- - - Connect - -

-
-
-
- MakerDAO -
-

- - - Switchboard - -

-
-
-
-
- {name === "Powerhouse" && ( -
-
-

Dev

-
-
-
- MakerDAO -
-

- - - Connect - -

+
+
+ MakerDAO +
+

+ + + Connect + +

+
-
-
- MakerDAO -
-

- - - Switchboard - -

+
+ MakerDAO +
+

+ + + Switchboard + +

+
+ {env[envName].fusion && ( +
+ MakerDAO +
+

+ + + Fusion + +

+
+
+ )}
-
- )} + ))} +
); } diff --git a/frontend/pages/index.tsx b/frontend/pages/index.tsx index d833b05..cd371b7 100644 --- a/frontend/pages/index.tsx +++ b/frontend/pages/index.tsx @@ -6,79 +6,123 @@ import Renown from "../public/renown-icon.svg"; import Fusion from "../public/fusion-icon.png"; import Academy from "../public/academy-icon.svg"; import Link from "next/link"; + +export interface Environment { + production: { + connect: string; + switchboard: string; + fusion?: string; + }; + staging?: { + connect: string; + switchboard: string; + fusion?: string; + }; + develop?: { + connect: string; + switchboard: string; + fusion?: string; + }; +} const Home: NextPage = () => { + const environmentKeys = ["Powerhouse", "Sky.money"] as const; + type EnvironmentKey = (typeof environmentKeys)[number]; + + const environments: Record = { + Powerhouse: { + production: { + connect: "https://connect.phd", + switchboard: "https://switchboard.phd", + // fusion: "https://apps.powerhouse.io/powerhouse/fusion", + }, + staging: { + connect: "https://staging.connect.phd", + switchboard: "https://staging.switchboard.phd", + // fusion: "https://apps.powerhouse.io/staging/powerhouse/fusion", + }, + develop: { + connect: "https://apps.powerhouse.io/develop/powerhouse/connect/", + switchboard: "https://apps.powerhouse.io/develop/powerhouse/switchboard", + }, + }, + "Sky.money": { + production: { + connect: "https://connect.sky.money", + switchboard: "https://switchboard.sky.money", + fusion: "https://fusion.sky.money", + }, + staging: { + connect: "https://connect-staging.sky.money", + switchboard: "https://switchboard-staging.sky.money", + fusion: "https://fusion-staging.sky.money", + }, + }, + }; + return ( -
-
-
-
- Powerhouse -

Apps of Powerhouse

- {/*

Learn how to grow your business with our expert advice.

*/} +
+
+ Powerhouse +

Apps of Powerhouse

+ {/*

Learn how to grow your business with our expert advice.

*/} +
+
+
+ Sky.money +
+

+ + + Renown + +

-
-
- MakerDAO -
-

- - - Renown - -

-
-
-
- MakerDAO -
-

- - Academy -

-
-
-
- MakerDAO -
-

- - Fusion -

-
-
+
+
+ Sky.money +
+

+ + Academy +

-
- - - +
+ +
+ +
+ {environmentKeys.map((name) => ( + + ))} +
+ +
+
+ Sky.money +
+

+ + + Design System + +

-
-
- MakerDAO -
-

- - - Design System - -

-
-
-
- MakerDAO -
-

- - - Document Model Libs - -

-
-
+
+
+ Sky.money +
+

+ + + Document Model Libs + +

+ + ); };