From 9c531f3d99a88da571569220c9d077df4e935d35 Mon Sep 17 00:00:00 2001 From: Lea Date: Thu, 21 Sep 2023 18:15:49 +0200 Subject: [PATCH] Revert "feat: user stream UI" i messed up and worked on the wrong branch :trollface: --- app/panel/stream/page.tsx | 46 ----------- components/common/NavigationLinks.tsx | 7 -- components/pages/stream/UserReviewCard.tsx | 96 ---------------------- 3 files changed, 149 deletions(-) delete mode 100644 app/panel/stream/page.tsx delete mode 100644 components/pages/stream/UserReviewCard.tsx diff --git a/app/panel/stream/page.tsx b/app/panel/stream/page.tsx deleted file mode 100644 index 628aa15..0000000 --- a/app/panel/stream/page.tsx +++ /dev/null @@ -1,46 +0,0 @@ -"use client" - -import { UserReviewCard } from "@/components/pages/stream/UserReviewCard"; -import { Card, CardDescription } from "@/components/ui/card"; -import { Account, fetchAccountById, fetchUserById } from "@/lib/db"; -import { Circle } from "lucide-react"; -import { useEffect, useMemo, useState } from "react"; -import { User } from "revolt-api"; - -export default function UserStream() { - const [connectionState, setConnectionState] = useState<"Connecting"|"Connected"|"Disconnected">("Connecting"); - const [user, setUser] = useState(null); - const [account, setAccount] = useState(null); - - const connectionColour = useMemo(() => { - switch(connectionState) { - case "Connected": return "#55aa7f"; - case "Connecting": return "#fb923c"; - case "Disconnected": return "#ef4444"; - } - }, [connectionState]); - - useEffect(() => { - fetchUserById("01H6BZB5F4B6GTKSJCV6TRGZ22").then(setUser); - fetchAccountById("01H6BZB5F4B6GTKSJCV6TRGZ22").then(setAccount); - - setTimeout(() => setConnectionState("Connected"), 1000); - }, []); - - return account ? ( -
- - - - {connectionState} - - - - -
- - -
-
- ) : null; -} diff --git a/components/common/NavigationLinks.tsx b/components/common/NavigationLinks.tsx index 53a47c3..1a147c9 100644 --- a/components/common/NavigationLinks.tsx +++ b/components/common/NavigationLinks.tsx @@ -11,7 +11,6 @@ import { Siren, Sparkles, TrendingUp, - ClipboardList, } from "lucide-react"; export function NavigationLinks() { @@ -41,12 +40,6 @@ export function NavigationLinks() { > - - - - - { - user - ? {user.username}#{user.discriminator} - : Pending onboarding - } - {account.email} · {dayjs(decodeTime(account._id)).fromNow()} - - - - - - - - - - - - - - - - - - ; -}