From 22775f9a8a91447936db9b8e288c77a749fc5350 Mon Sep 17 00:00:00 2001 From: vascYT Date: Mon, 13 Nov 2023 20:23:47 +0100 Subject: [PATCH] only show spotify as activity --- src/components/DiscordActivity.tsx | 33 +++++++++++++----------------- src/components/Navbar.tsx | 4 ++-- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/components/DiscordActivity.tsx b/src/components/DiscordActivity.tsx index d543ac0..d64dbbe 100644 --- a/src/components/DiscordActivity.tsx +++ b/src/components/DiscordActivity.tsx @@ -10,7 +10,8 @@ export default function DiscordActivity() { if ( !activity || activity.discord_status === "offline" || - activity.activities.length <= 0 + activity.activities.length <= 0 || + !activity.listening_to_spotify ) return <>; @@ -18,26 +19,20 @@ export default function DiscordActivity() {
- {activity.listening_to_spotify ? ( - <> - Listening to ` - {activity.spotify?.track_id != null ? ( - - {activity.spotify?.song} - - ) : ( - activity.spotify?.song - )} - ` - + Listening to ` + {activity.spotify?.track_id != null ? ( + + {activity.spotify?.song} + ) : ( - `Playing ${activity.activities[0].name}` + activity.spotify?.song )} + `
); diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 564497f..042461c 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,6 +1,6 @@ import Socials from "./Socials"; -const links = ["/", "/posts"]; +const links = ["/"]; function Item(props: { link: string }) { return ( @@ -12,7 +12,7 @@ function Item(props: { link: string }) { export default function Navbar() { return ( -
+
{links.map((link) => (