@@ -16,7 +16,7 @@ const LivestreamCard = ({ livestream }: any) => {
1616 // Reset the copied state after 2 seconds
1717 setTimeout ( ( ) => setIsCopied ( false ) , 2000 ) ;
1818 } catch ( err ) {
19- toast . error ( "An error occured, try again" )
19+ toast . error ( "An error occured, try again" ) ;
2020 }
2121 } ;
2222 const viewDetails = ( ) => {
@@ -29,32 +29,36 @@ const LivestreamCard = ({ livestream }: any) => {
2929 < div >
3030 < h3 className = "text-lg font-semibold text-primary-white flex items-center gap-2" >
3131 { livestream ?. title }
32- < span
33- onClick = { handleCopy }
34- title = "Click to copy stream url"
35- className = "cursor-pointer"
36- >
37- { isCopied ? (
38- < span className = "text-green-500 text-[12px]" >
39- Copied to clipboard!
40- </ span >
41- ) : (
42- < FaRegCopy />
43- ) }
44- </ span >
32+ { livestream ?. status . toLowerCase ( ) !== "ended" && (
33+ < span
34+ onClick = { handleCopy }
35+ title = "Click to copy stream url"
36+ className = "cursor-pointer"
37+ >
38+ { isCopied ? (
39+ < span className = "text-green-500 text-[12px]" >
40+ Copied to clipboard!
41+ </ span >
42+ ) : (
43+ < FaRegCopy />
44+ ) }
45+ </ span >
46+ ) }
4547 </ h3 >
4648 { /* <p className="text-primary-white text-sm mb-2">Date: {livestream.date}</p> */ }
4749 < p className = "text-primary-white text-[13px]" >
4850 Status: { livestream ?. status }
4951 </ p >
5052 </ div >
51- < button
52- onClick = { viewDetails }
53- className = "relative mt-2 group overflow-hidden px-4 py-2 font-semibold text-primary-white hover:text-black bg-transparent border border-primary-border rounded-md"
54- >
55- < span className = "relative z-[10]" > Start stream</ span >
56- < div className = "absolute inset-0 w-full h-full bg-primary transition-transform duration-500 transform translate-y-full group-hover:translate-y-0" > </ div >
57- </ button >
53+ { livestream ?. status . toLowerCase ( ) !== "ended" && (
54+ < button
55+ onClick = { viewDetails }
56+ className = "relative mt-2 group overflow-hidden px-4 py-2 font-semibold text-primary-white hover:text-black bg-transparent border border-primary-border rounded-md"
57+ >
58+ < span className = "relative z-[10]" > Start stream</ span >
59+ < div className = "absolute inset-0 w-full h-full bg-primary transition-transform duration-500 transform translate-y-full group-hover:translate-y-0" > </ div >
60+ </ button >
61+ ) }
5862 </ div >
5963 ) ;
6064} ;
0 commit comments