From d02bb2f2372ea29b3eb166122d65fbd71f8bafbf Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sun, 21 Nov 2021 23:31:28 +0000 Subject: [PATCH] idklol --- .../src/app/pages/dashboard/DashboardPage.tsx | 80 ++++++++++++++++++- client/src/util/splashes.ts | 2 + 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/client/src/app/pages/dashboard/DashboardPage.tsx b/client/src/app/pages/dashboard/DashboardPage.tsx index 68119e00e..745fd45bc 100644 --- a/client/src/app/pages/dashboard/DashboardPage.tsx +++ b/client/src/app/pages/dashboard/DashboardPage.tsx @@ -1,12 +1,90 @@ import useSetSubheader from "components/layout/header/useSetSubheader"; +import Divider from "components/util/Divider"; +import LinkButton from "components/util/LinkButton"; import SplashText from "components/util/SplashText"; +import { UserContext } from "context/UserContext"; +import { UserGameStatsContext } from "context/UserGameStatsContext"; import { UserSettingsContext } from "context/UserSettingsContext"; +import { TachiConfig } from "lib/config"; import React, { useContext } from "react"; +import { Link } from "react-router-dom"; +import { PublicUserDocument } from "tachi-common"; +import { ToCDNURL } from "util/api"; export function DashboardPage() { const { settings } = useContext(UserSettingsContext); useSetSubheader("Dashboard", [settings]); - return <>{/* */}; + const { user } = useContext(UserContext); + const { ugs } = useContext(UserGameStatsContext); + + if (!user) { + return ; + } else if (user && !ugs) { + return ; + } + + return ; +} + +function DashboardLoggedIn({ user }: { user: PublicUserDocument }) { + return ( +
+ Welcome Back, {user.username}. +
+ ); +} + +function DashboardNotLoggedIn() { + return ( +
+

Welcome to {TachiConfig.name}!

+

+ Looks like you're not logged in. If you've got an account,{" "} + Login! +

+ +

I'm New Around Here, What is this?

+ + {TachiConfig.name} is a Rhythm Game Score Tracker. That means we... + + + + + + +
+ Interested? You can register right now for free! +
+ + Register! + +
+
+ ); +} + +function FeatureContainer({ tagline, description }: { tagline: string; description: string }) { + return ( +
+
+

{tagline}

+ {description} +
+
+ ); +} + +function DashboardLoggedInNoScores({ user }: { user: PublicUserDocument }) { + return foo; } diff --git a/client/src/util/splashes.ts b/client/src/util/splashes.ts index 81dac0e55..07890fcc5 100644 --- a/client/src/util/splashes.ts +++ b/client/src/util/splashes.ts @@ -86,6 +86,8 @@ export const loggedInSplashes = [ "When lava pours out near the sea surface, tremendous volcanic explosions sometimes occur.", "But thE MOOOOON JUST STAAARED BAACK AAAT MEE", "However... I kinda feel like this one's in the bag.", + "Oh yeah? I can exit vim, buddy.", + "Discovered Colours", ]; // Stuff that's bad for the kids, you know?