aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Player/index.tsx
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-06-03 01:50:04 -0700
committerPinapelz <yukais@pinapelz.com>2026-06-03 01:50:04 -0700
commit4cf1f4beaea32a62f7567dab53a80853be5cb8d3 (patch)
tree20b398dd24130085102587aaae3338522902a1c0 /src/components/Player/index.tsx
parent4a2f82f06490b7fb277dc6c7558d10c34503a495 (diff)
fix: decoded song object equality check
Diffstat (limited to 'src/components/Player/index.tsx')
-rw-r--r--src/components/Player/index.tsx24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/components/Player/index.tsx b/src/components/Player/index.tsx
index e5d2d28..fcfce72 100644
--- a/src/components/Player/index.tsx
+++ b/src/components/Player/index.tsx
@@ -1,6 +1,6 @@
import React from "react";
import YouTube from "react-youtube";
-import { IoPlay } from "react-icons/io5";
+import { IoPlay, IoPause } from "react-icons/io5";
import { playTimes } from "../../constants";
@@ -77,12 +77,22 @@ export function Player({ id, currentTry }: Props) {
<Styled.TimeStamp>1s</Styled.TimeStamp>
<Styled.TimeStamp>16s</Styled.TimeStamp>
</Styled.TimeStamps>
- <IoPlay
- style={{ cursor: "pointer" }}
- size={36}
- color="var(--cl-green-6)"
- onClick={startPlayback}
- />
+ {!play && (
+ <IoPlay
+ style={{ cursor: "pointer" }}
+ size={36}
+ color="var(--cl-green-6)"
+ onClick={startPlayback}
+ />
+ )}
+ {play && (
+ <IoPause
+ style={{ cursor: "pointer" }}
+ size={36}
+ color="var(--cl-green-6)"
+ onClick={startPlayback}
+ />
+ )}
</>
) : (
<p>Loading player...</p>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage