@@ -11,8 +11,6 @@ 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 { getIsolatedFacetLink } from "@/service/URLManager/helper" ;
15
-
16
14
interface ITranscriptMetadataComponent {
17
15
title : string ;
18
16
date : string | Date ;
@@ -34,43 +32,37 @@ const TranscriptMetadataComponent = ({
34
32
setShowDetail ( ( prev ) => ! prev ) ;
35
33
} ;
36
34
35
+
37
36
const convertedDate = date ? new Date ( date ) : false
38
37
39
- const formattedDate = isDate ( convertedDate ) ? format ( convertedDate , "d MMMM, yyyy" ) : "" ;
38
+ const formattedDate = isDate ( convertedDate ) ? format ( convertedDate , "d MMMM, yyyy" ) : "" ;
39
+
40
40
41
41
return (
42
- < 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" >
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 " >
43
43
< div className = "flex flex-col md:flex-row flex-wrap gap-4 justify-between " >
44
44
< h4 className = "text-orange-custom-100 text-xl font-bold md:text-2xl 2xl:text-[2rem]" >
45
45
{ title }
46
46
</ h4 >
47
47
< button
48
48
onClick = { handleShowDetail }
49
- className = "text-black text-sm lg:text-base gap-1 py-1.5 2xl:py-2 px-5 flex items-center border w-[149px] md:w-[154px] rounded-lg border-gray-custom-1100 whitespace-nowrap"
49
+ className = "text-black dark:text-gray-custom-100
50
+ text-sm lg:text-base gap-1 py-1.5 2xl:py-2 px-5 flex items-center border
51
+ w-[149px] md:w-[154px] rounded-lg border-gray-custom-1100 whitespace-nowrap"
50
52
>
51
53
{ showDetail ? (
52
54
< >
53
- < Image
54
- src = "/svgs/eye-close-icon.svg"
55
- alt = "eye close icon"
56
- width = { 24 }
57
- height = { 24 }
58
- className = "w-5"
59
- />
55
+ < EyeClose className = "w-5 dark:text-gray-custom-100" />
60
56
< span className = "font-medium text-sm 2xl:text-base" >
61
57
Hide Details{ " " }
62
58
</ span >
63
59
</ >
64
60
) : (
65
61
< >
66
- < Image
67
- src = "/svgs/eye-open-icon.svg"
68
- alt = "eye open icon"
69
- width = { 24 }
70
- height = { 24 }
71
- className = "w-5"
72
- />
73
- < span className = "font-medium" > Show Details</ span >
62
+ < EyeOpen className = "w-5 dark:text-gray-custom-100" />
63
+ < span className = "font-medium text-sm 2xl:text-base" >
64
+ Show Details
65
+ </ span >
74
66
</ >
75
67
) }
76
68
</ button >
@@ -81,7 +73,7 @@ const TranscriptMetadataComponent = ({
81
73
< MetadataBlock
82
74
header = {
83
75
< >
84
- < CalendarIcon width = { "19px" } color = "#141B34" />
76
+ < CalendarIcon width = { "19px" } />
85
77
< p className = "text-base lg:text-lg font-semibold" > Date</ p >
86
78
</ >
87
79
}
@@ -100,13 +92,13 @@ const TranscriptMetadataComponent = ({
100
92
< MetadataBlock
101
93
header = {
102
94
< >
103
- < BookmarkIcon width = { "19px" } color = "#000000" />
95
+ < BookmarkIcon width = { "19px" } />
104
96
< p className = "text-base lg:text-lg font-semibold" > Topics</ p >
105
97
</ >
106
98
}
107
99
footer = {
108
100
< div className = "flex flex-wrap gap-2" >
109
- { ( topics && topics . length > 0 ) ?
101
+ { topics && topics . length > 0 ? (
110
102
topics . map ( ( topic ) => (
111
103
< Pill key = { topic . slug } kind = "link" name = { topic . name } slug = { getIsolatedFacetLink ( { filter_field : "tags" , filter_value : topic . slug } ) } />
112
104
) ) :
@@ -119,13 +111,13 @@ const TranscriptMetadataComponent = ({
119
111
< MetadataBlock
120
112
header = {
121
113
< >
122
- < MicIcon width = { "19px" } color = "#000000" />
114
+ < MicIcon width = { "19px" } / >
123
115
< p className = "text-base lg:text-lg font-semibold" > Speakers </p >
124
116
</>
125
117
}
126
118
footer = {
127
119
< div className = "flex flex-wrap gap-2" >
128
- { speakers && speakers . length > 0 ?
120
+ { speakers & & speakers . length > 0 ? (
129
121
speakers . map ( ( speaker ) => (
130
122
< Pill key = { speaker } kind = "link" name = { speaker } slug = { getIsolatedFacetLink ( { filter_field : "authors" , filter_value : speaker } ) } />
131
123
) ) :
@@ -138,13 +130,7 @@ const TranscriptMetadataComponent = ({
138
130
< MetadataBlock
139
131
header = {
140
132
< >
141
- < Image
142
- src = "/svgs/pencil-icon.svg"
143
- alt = "pencil icon"
144
- width = { 24 }
145
- height = { 24 }
146
- className = "w-5"
147
- />
133
+ < PencilIcon className = "w-5 dark:text-gray-custom-100" / >
148
134
< p className = "text-base lg:text-lg font-semibold" >
149
135
Transcript by
150
136
< / p >
0 commit comments