-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gh14] jump links #54
base: main
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/ahhacreative/compressedfm/249eUyTyyapfxXN3rxB5qkYS52Pq [Deployment for 2b95eee failed] |
There are a couple of bugs:
|
@@ -35,6 +36,12 @@ const IndividualEpisodePage = ({ | |||
}) => { | |||
// state | |||
const [skipTo, setSkipTo] = useState(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to list out what I have changed.
This should be 0 not null
|
||
useEffect(() => { | ||
const UrlParams = router.query; | ||
skipToTimestamp(UrlParams.time); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make sure that time is always a number. Number(())
I see you did it below
@@ -13,6 +13,10 @@ export const useAudioPlayer = (audioRef, progressBarRef) => { | |||
progressBarRef.current.max = seconds; | |||
}; | |||
|
|||
useEffect(() => { | |||
onLoadedMetadata(); | |||
}, [audioRef?.current?.loadedmetadata, audioRef?.current?.readyState]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
audioRef
appears to be a required prop so it will always be there no need for the first ?
audioRed.current?.load.......
The ?
only needs to be on properties that we have no clue if they are there or not.
I actually just learned this from James' optional chaining video
…n query param and jump to time without auto play. Duration isn't displaying initially
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Fixes #14
Feature description