@@ -11,6 +11,10 @@ import { createSlug, FieldCountItem } from "@/utils";
11
11
import AiGeneratedIcon from "../svgs/AIGeneratedIcon" ;
12
12
import { format , isDate } from "date-fns" ;
13
13
import Pill from "./Pill" ;
14
+ import EyeClose from "../svgs/EyeClose" ;
15
+ import EyeOpen from "../svgs/EyeOpen" ;
16
+ import { getIsolatedFacetLink } from "@/service/URLManager/helper" ;
17
+ import PencilIcon from "../svgs/PencilIcon" ;
14
18
interface ITranscriptMetadataComponent {
15
19
title : string ;
16
20
date : string | Date ;
@@ -32,34 +36,34 @@ const TranscriptMetadataComponent = ({
32
36
setShowDetail ( ( prev ) => ! prev ) ;
33
37
} ;
34
38
35
-
39
+
36
40
const convertedDate = date ? new Date ( date ) : false
37
-
41
+
38
42
const formattedDate = isDate ( convertedDate ) ? format ( convertedDate , "d MMMM, yyyy" ) : "" ;
39
43
40
44
41
45
return (
42
- < div className = "border flex text-black dark:text-gray-custom-100 flex-col rounded-2xl p-4 md:p-5 2xl:p-6 gap-4 w-full border-gray-custom-1200 dark:border-gray-custom-1800" >
46
+ < div className = "border flex text-black flex-col rounded-2xl p-4 md:p-5 2xl:p-6 gap-4 w-full border-gray-custom-1200 dark:border-gray-custom-1800" >
43
47
< div className = "flex flex-col md:flex-row flex-wrap gap-4 justify-between " >
44
48
< h4 className = "text-orange-custom-100 text-xl font-bold md:text-2xl 2xl:text-[2rem]" >
45
49
{ title }
46
50
</ h4 >
47
51
< button
48
52
onClick = { handleShowDetail }
49
- className = "text-black dark:text-gray-custom-100
53
+ className = "text-black
50
54
text-sm lg:text-base gap-1 py-1.5 2xl:py-2 px-5 flex items-center border
51
55
w-[149px] md:w-[154px] rounded-lg border-gray-custom-1100 whitespace-nowrap"
52
56
>
53
57
{ showDetail ? (
54
58
< >
55
- < EyeClose className = "w-5 dark:text-gray-custom-100 " />
59
+ < EyeClose className = "w-5" />
56
60
< span className = "font-medium text-sm 2xl:text-base" >
57
61
Hide Details{ " " }
58
62
</ span >
59
63
</ >
60
64
) : (
61
65
< >
62
- < EyeOpen className = "w-5 dark:text-gray-custom-100 " />
66
+ < EyeOpen className = "w-5" />
63
67
< span className = "font-medium text-sm 2xl:text-base" >
64
68
Show Details
65
69
</ span >
@@ -101,7 +105,7 @@ const TranscriptMetadataComponent = ({
101
105
{ topics && topics . length > 0 ? (
102
106
topics . map ( ( topic ) => (
103
107
< Pill key = { topic . slug } kind = "link" name = { topic . name } slug = { getIsolatedFacetLink ( { filter_field : "tags" , filter_value : topic . slug } ) } />
104
- ) ) :
108
+ ) ) ) :
105
109
< p className = "pl-2.5 pt-1.5 text-xs md:text-sm lg:text-sm 2xl:text-base md:font-medium" > Not available</ p >
106
110
}
107
111
</ div >
@@ -120,7 +124,7 @@ const TranscriptMetadataComponent = ({
120
124
{ speakers && speakers . length > 0 ? (
121
125
speakers . map ( ( speaker ) => (
122
126
< Pill key = { speaker } kind = "link" name = { speaker } slug = { getIsolatedFacetLink ( { filter_field : "authors" , filter_value : speaker } ) } />
123
- ) ) :
127
+ ) ) ) :
124
128
< p className = "pl-2.5 pt-1.5 text-xs md:text-sm lg:text-sm 2xl:text-base md:font-medium" > Not available</ p >
125
129
}
126
130
</ div >
0 commit comments