Index: frontend/src/pages/SongDetail.tsx
===================================================================
--- frontend/src/pages/SongDetail.tsx	(revision a5406e15fca40fca7cc5f6ddb05de390f713d71b)
+++ frontend/src/pages/SongDetail.tsx	(revision 1579b4f9eaf503a14012d471db11e16e645306e3)
@@ -1,8 +1,10 @@
 import { useEffect, useRef, useState } from "react";
 import { Link, useParams } from "react-router-dom";
+import { toast } from "react-toastify";
 import axiosInstance from "../api/axiosInstance";
 import { useAuth } from "../context/authContext";
 import { usePlayer } from "../context/playerContext";
 import type { SongDetail as SongDetailType } from "../utils/types";
+import { toEmbedUrl } from "../utils/utils";
 
 const ROLE_LABELS: Record<string, string> = {
@@ -18,27 +20,4 @@
 const formatRole = (role: string): string => {
 	return ROLE_LABELS[role] || role.replace(/_/g, " ");
-};
-
-// convert a regular youtube URL to an embeddable URL
-const toEmbedUrl = (url: string): string => {
-	try {
-		const parsed = new URL(url);
-		// youtube.com/watch?v=ID
-		if (
-			(parsed.hostname === "www.youtube.com" ||
-				parsed.hostname === "youtube.com") &&
-			parsed.searchParams.has("v")
-		) {
-			return `https://www.youtube.com/embed/${parsed.searchParams.get("v")}`;
-		}
-		// youtu.be/ID
-		if (parsed.hostname === "youtu.be") {
-			return `https://www.youtube.com/embed${parsed.pathname}`;
-		}
-		// already an embed URL or other provider – return as-is
-		return url;
-	} catch {
-		return url;
-	}
 };
 
@@ -137,5 +116,5 @@
 			setSong(response.data);
 		} catch (err) {
-			// todo :add toast
+			toast.error("Failed to delete review");
 			console.error("Error deleting review:", err);
 		}
@@ -152,4 +131,5 @@
 			);
 		} catch (err) {
+			toast.error("Failed to toggle like");
 			console.error("Error toggling like:", err);
 		}
