aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-11-10 22:59:28 +0300
committerGitHub <noreply@github.com>2024-11-10 22:59:28 +0300
commitfb29afc8dea1b729e0272d08ccd0a46b5a2adeaf (patch)
tree84e13f1f34d7e23010c95531036f2d8266f0b6fd /frontend/src/components
parentfeat/frontend: optimizing imports, file extensions (#230) (diff)
downloadlphub-fb29afc8dea1b729e0272d08ccd0a46b5a2adeaf.tar.gz
lphub-fb29afc8dea1b729e0272d08ccd0a46b5a2adeaf.tar.bz2
lphub-fb29afc8dea1b729e0272d08ccd0a46b5a2adeaf.zip
fix/frontend: broken youtube url (#231)
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/Summary.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx
index 14b02ac..4bcaa6a 100644
--- a/frontend/src/components/Summary.tsx
+++ b/frontend/src/components/Summary.tsx
@@ -29,7 +29,7 @@ const Summary: React.FC<SummaryProps> = ({ selectedRun, setSelectedRun, data })
29 29
30 function _get_youtube_id(url: string): string { 30 function _get_youtube_id(url: string): string {
31 const urlArray = url.split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); 31 const urlArray = url.split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);
32 return (urlArray[2] !== undefined) ? urlArray[2].split(/[^0-9a-z_]/i)[0] : urlArray[0]; 32 return (urlArray[2] !== undefined) ? urlArray[2].split(/[^0-9a-z_-]/i)[0] : urlArray[0];
33 }; 33 };
34 34
35 function _category_change() { 35 function _category_change() {