fix: quiz and time validation before linking to video

This commit is contained in:
Jannat Patel
2025-06-02 19:12:13 +05:30
parent 7b7484332b
commit 2c8ce133f7
5 changed files with 58 additions and 23 deletions

View File

@@ -615,3 +615,10 @@ export const updateMetaInfo = (type, route, meta) => {
console.error(error)
})
}
export const formatTimestamp = (seconds) => {
const date = new Date(seconds * 1000)
const minutes = String(date.getUTCMinutes()).padStart(2, '0')
const secs = String(date.getUTCSeconds()).padStart(2, '0')
return `${minutes}:${secs}`
}