From 4aef35cb408fdce393432f2b4d6cf564b5f129fe Mon Sep 17 00:00:00 2001 From: Gabe Mendoza Date: Sun, 10 Nov 2024 21:47:55 -0600 Subject: [PATCH] Coming soon (#14) * coming soon * more coming soon * tweak things around coming soon --- apps/nextjs/package.json | 1 + apps/nextjs/src/app/analytics/page.tsx | 12 ++++--- .../src/app/dashboard/@pokemon/page.tsx | 10 ++++-- .../src/app/dashboard/@settings/page.tsx | 2 +- .../dashboard/@tournament_history/page.tsx | 10 ++++-- apps/nextjs/src/app/dashboard/layout.tsx | 21 ++++++------ apps/nextjs/src/app/organizations/page.tsx | 2 +- apps/nextjs/src/app/page.tsx | 4 +-- .../src/app/players/[username]/page.tsx | 8 ++--- apps/nextjs/src/app/players/page.tsx | 26 +++++---------- apps/nextjs/src/components/coming-soon.tsx | 22 +++++++++++++ pnpm-lock.yaml | 33 +++++++++++++++++++ 12 files changed, 105 insertions(+), 46 deletions(-) create mode 100644 apps/nextjs/src/components/coming-soon.tsx diff --git a/apps/nextjs/package.json b/apps/nextjs/package.json index 3b469198..eb5dd681 100644 --- a/apps/nextjs/package.json +++ b/apps/nextjs/package.json @@ -42,6 +42,7 @@ "@tsparticles/slim": "^3.5.0", "@uploadthing/react": "^7.1.0", "@vercel/analytics": "^1.3.2", + "@vercel/flags": "^2.6.3", "@vercel/functions": "^1.5.0", "@vercel/kv": "^3.0.0", "@vercel/speed-insights": "^1.0.14", diff --git a/apps/nextjs/src/app/analytics/page.tsx b/apps/nextjs/src/app/analytics/page.tsx index abdb977d..e9e12a1f 100644 --- a/apps/nextjs/src/app/analytics/page.tsx +++ b/apps/nextjs/src/app/analytics/page.tsx @@ -1,13 +1,17 @@ import type { Metadata } from "next"; +import ComingSoon from "~/components/coming-soon"; + export const metadata: Metadata = { title: "Analytics", }; -export default function Analytics() { +export default function PlayersPage() { return ( -
-

Analytics

-
+ +
+

"Analytics is under construction

+
+
); } diff --git a/apps/nextjs/src/app/dashboard/@pokemon/page.tsx b/apps/nextjs/src/app/dashboard/@pokemon/page.tsx index e82ba199..460c1431 100644 --- a/apps/nextjs/src/app/dashboard/@pokemon/page.tsx +++ b/apps/nextjs/src/app/dashboard/@pokemon/page.tsx @@ -1,7 +1,11 @@ +import ComingSoon from "~/components/coming-soon"; + export default function DashboardPokemon() { return ( -
-

DASHBOARD POKEMON PAGE

-
+ +
+

Pokemon Team Management is under construction

+
+
); } diff --git a/apps/nextjs/src/app/dashboard/@settings/page.tsx b/apps/nextjs/src/app/dashboard/@settings/page.tsx index 5a555848..510c7094 100644 --- a/apps/nextjs/src/app/dashboard/@settings/page.tsx +++ b/apps/nextjs/src/app/dashboard/@settings/page.tsx @@ -4,7 +4,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@battle-stadium/ui"; export default function Settings() { return ( -
+
diff --git a/apps/nextjs/src/app/dashboard/@tournament_history/page.tsx b/apps/nextjs/src/app/dashboard/@tournament_history/page.tsx index f9b431d8..b57348cb 100644 --- a/apps/nextjs/src/app/dashboard/@tournament_history/page.tsx +++ b/apps/nextjs/src/app/dashboard/@tournament_history/page.tsx @@ -1,7 +1,11 @@ +import ComingSoon from "~/components/coming-soon"; + export default function TournamentHistory() { return ( -
-

Tournament History

-
+ +
+

Tournament History is under construction

+
+
); } diff --git a/apps/nextjs/src/app/dashboard/layout.tsx b/apps/nextjs/src/app/dashboard/layout.tsx index 95dd959a..098d1fa3 100644 --- a/apps/nextjs/src/app/dashboard/layout.tsx +++ b/apps/nextjs/src/app/dashboard/layout.tsx @@ -4,10 +4,10 @@ import type { DashboardLayoutProps } from "~/types"; import { getAccountMe } from "~/app/server-actions/accounts/actions"; const tabsList = [ + { key: "dashboard", title: "Dashboard" }, { key: "profiles", title: "Profiles" }, { key: "pokemon", title: "Pokemon" }, { key: "tournaments", title: "Tournaments" }, - { key: "dashboard", title: "Dashboard" }, { key: "settings", title: "Settings" }, ]; const adminTab = { key: "admin", title: "Admin" }; @@ -20,9 +20,9 @@ export default async function DashboardLayout( const tabsToRender = me?.admin ? [...tabsList, adminTab] : tabsList; return ( -
- - +
+ + {tabsToRender.map(({ key, title }) => ( {title} @@ -31,7 +31,9 @@ export default async function DashboardLayout( {tabsToRender.map(({ key }) => ( - {renderTabContent(key, props)} +
+ {renderTabContent(key, props)} +
))}
@@ -39,16 +41,13 @@ export default async function DashboardLayout( ); } -function renderTabContent( - activeTab: string, - props: Readonly, -) { - switch (activeTab) { +function renderTabContent(key: string, props: Readonly) { + switch (key) { case "profiles": return props.profiles; case "pokemon": return props.pokemon; - case "tournament_history": + case "tournaments": return props.tournament_history; case "dashboard": return props.children; diff --git a/apps/nextjs/src/app/organizations/page.tsx b/apps/nextjs/src/app/organizations/page.tsx index 3b7de9a5..c22c869c 100644 --- a/apps/nextjs/src/app/organizations/page.tsx +++ b/apps/nextjs/src/app/organizations/page.tsx @@ -16,7 +16,7 @@ export default async function OrganizationsPage() { const orgs = await getOrganizations(); return ( <> -
+
diff --git a/apps/nextjs/src/app/page.tsx b/apps/nextjs/src/app/page.tsx index e2a2ac14..066c1521 100644 --- a/apps/nextjs/src/app/page.tsx +++ b/apps/nextjs/src/app/page.tsx @@ -12,10 +12,10 @@ export default function Home() { return (
-
+
-
+

battlestadium.gg

diff --git a/apps/nextjs/src/app/players/[username]/page.tsx b/apps/nextjs/src/app/players/[username]/page.tsx index ce640c35..771ce262 100644 --- a/apps/nextjs/src/app/players/[username]/page.tsx +++ b/apps/nextjs/src/app/players/[username]/page.tsx @@ -1,4 +1,5 @@ import { getProfile } from "~/app/server-actions/profiles/actions"; +import ComingSoon from "~/components/coming-soon"; interface PlayerProfilePageProps { params: Promise<{ @@ -22,9 +23,8 @@ export default async function PlayerProfilePage( const player = await getProfile(params.username); return ( -
-

{player?.username}

-

{player?.slug}

-
+ +

The Player Profiles are under construction

+
); } diff --git a/apps/nextjs/src/app/players/page.tsx b/apps/nextjs/src/app/players/page.tsx index 5eec151b..ab7cee95 100644 --- a/apps/nextjs/src/app/players/page.tsx +++ b/apps/nextjs/src/app/players/page.tsx @@ -1,19 +1,11 @@ -import PlayersTable from "~/app/players/players-table"; -import { getProfiles } from "~/app/server-actions/profiles/actions"; +import ComingSoon from "~/components/coming-soon"; -const columns = [ - { - key: "username", - label: "Username", - }, - { - key: "pronouns", - label: "Pronouns", - }, -]; - -export default async function PlayersPage() { - const players = await getProfiles(); - - return ; +export default function PlayersPage() { + return ( + +
+

Player profiles are under construction

+
+
+ ); } diff --git a/apps/nextjs/src/components/coming-soon.tsx b/apps/nextjs/src/components/coming-soon.tsx new file mode 100644 index 00000000..16b92502 --- /dev/null +++ b/apps/nextjs/src/components/coming-soon.tsx @@ -0,0 +1,22 @@ +import type { ReactNode } from "react"; + +interface ComingSoonProps { + title: string; + children: ReactNode; +} +export default function ComingSoon({ + title, + children, +}: Readonly) { + return ( +
+
+
+

{title}

+ {children} +
+

Coming Soon

+
+
+ ); +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 308010f6..936bed5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -323,6 +323,9 @@ importers: '@vercel/analytics': specifier: ^1.3.2 version: 1.3.2(next@15.0.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + '@vercel/flags': + specifier: ^2.6.3 + version: 2.6.3(next@15.0.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@vercel/functions': specifier: ^1.5.0 version: 1.5.0 @@ -4391,6 +4394,23 @@ packages: react: optional: true + '@vercel/flags@2.6.3': + resolution: {integrity: sha512-knLDYS8MCc/zx4FF6KRzHQzAKdo8VQ3V0PEBI5WvRlFIhcqhcEomxHoK41/xMnNEQvUzETACHw610/i/pVwYSA==} + peerDependencies: + '@sveltejs/kit': '*' + next: '*' + react: '*' + react-dom: '*' + peerDependenciesMeta: + '@sveltejs/kit': + optional: true + next: + optional: true + react: + optional: true + react-dom: + optional: true + '@vercel/functions@1.5.0': resolution: {integrity: sha512-ub3ptVeOsx8UPgiTv9+rpQJqmF7VG8QIzguBZo0E0VRAyJliB8bt1ooB9Wrh3333dKzMNS8NMe3iFtf6OPUP3A==} engines: {node: '>= 16'} @@ -7028,6 +7048,9 @@ packages: join-component@1.1.0: resolution: {integrity: sha512-bF7vcQxbODoGK1imE2P9GS9aw4zD0Sd+Hni68IMZLj7zRnquH7dXUmMw9hDI5S/Jzt7q+IyTXN0rSg2GI0IKhQ==} + jose@5.2.1: + resolution: {integrity: sha512-qiaQhtQRw6YrOaOj0v59h3R6hUY9NvxBmmnMfKemkqYmBB0tEc97NbLP7ix44VP5p9/0YHG8Vyhzuo5YBNwviA==} + jose@5.9.6: resolution: {integrity: sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==} @@ -14240,6 +14263,14 @@ snapshots: next: 15.0.3(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 + '@vercel/flags@2.6.3(next@15.0.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + jose: 5.2.1 + optionalDependencies: + next: 15.0.3(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + '@vercel/functions@1.5.0': {} '@vercel/kv@3.0.0': @@ -17240,6 +17271,8 @@ snapshots: join-component@1.1.0: {} + jose@5.2.1: {} + jose@5.9.6: {} js-base64@3.7.7: {}