Skip to content

Commit

Permalink
only show spotify as activity
Browse files Browse the repository at this point in the history
  • Loading branch information
vascYT committed Nov 13, 2023
1 parent ab73035 commit 22775f9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
33 changes: 14 additions & 19 deletions src/components/DiscordActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,29 @@ export default function DiscordActivity() {
if (
!activity ||
activity.discord_status === "offline" ||
activity.activities.length <= 0
activity.activities.length <= 0 ||
!activity.listening_to_spotify
)
return <></>;

return (
<div className="mt-3 flex flex-row items-center space-x-2">
<div className="h-2 w-2 animate-pulse rounded-full bg-green-300"></div>
<span className="text-sm text-green-300">
{activity.listening_to_spotify ? (
<>
Listening to <span className="mr-[1.5px] font-bold">`</span>
{activity.spotify?.track_id != null ? (
<a
href={`https://open.spotify.com/track/${activity.spotify?.track_id}`}
className="hover:underline"
target="_blank"
rel="noreferrer"
>
{activity.spotify?.song}
</a>
) : (
activity.spotify?.song
)}
<span className="ml-[1.5px] font-bold">`</span>
</>
Listening to <span className="mr-[1.5px] font-bold">`</span>
{activity.spotify?.track_id != null ? (
<a
href={`https://open.spotify.com/track/${activity.spotify?.track_id}`}
className="hover:underline"
target="_blank"
rel="noreferrer"
>
{activity.spotify?.song}
</a>
) : (
`Playing ${activity.activities[0].name}`
activity.spotify?.song
)}
<span className="ml-[1.5px] font-bold">`</span>
</span>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Socials from "./Socials";

const links = ["/", "/posts"];
const links = ["/"];

function Item(props: { link: string }) {
return (
Expand All @@ -12,7 +12,7 @@ function Item(props: { link: string }) {

export default function Navbar() {
return (
<div className="flex w-full pl-6 pr-6 pt-8 pb-8 text-white">
<div className="flex w-full pb-8 pl-6 pr-6 pt-8 text-white">
<div className="w-full space-x-6">
{links.map((link) => (
<Item link={link} key={link} />
Expand Down

0 comments on commit 22775f9

Please sign in to comment.