Skip to content

Commit

Permalink
Do nothing if current video
Browse files Browse the repository at this point in the history
  • Loading branch information
reynaldichernando committed Dec 4, 2024
1 parent 935a072 commit 0cf19d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ export default function Main() {
};

const handleSelectVideo = async (video: Video) => {
if (video.id === currentVideo?.id) {
setCurrentView("detail");
return;
}

try {
const { videoUrl, audioUrl } = await getMedia(video.id, video.title);
setVideoSrc(videoUrl);
Expand Down

0 comments on commit 0cf19d4

Please sign in to comment.