@@ -7,11 +7,13 @@ import {
7
7
CalendarIcon ,
8
8
MicIcon ,
9
9
} from "@bitcoin-dev-project/bdp-ui/icons" ;
10
- import Link from "next/link" ;
11
10
import { ContentData , createSlug } from "@/utils" ;
12
11
import AiGeneratedIcon from "../svgs/AIGeneratedIcon" ;
13
12
import { format , isDate } from "date-fns" ;
14
13
import Pill from "./Pill" ;
14
+ import PencilIcon from "../svgs/PencilIcon" ;
15
+ import EyeClose from "../svgs/EyeClose" ;
16
+ import EyeOpen from "../svgs/EyeOpen" ;
15
17
16
18
interface ITranscriptMetadataComponent {
17
19
title : string ;
@@ -34,44 +36,37 @@ const TranscriptMetadataComponent = ({
34
36
setShowDetail ( ( prev ) => ! prev ) ;
35
37
} ;
36
38
37
- const convertedDate = date ? new Date ( date ) : false
38
-
39
- const formattedDate = isDate ( convertedDate ) ? format ( convertedDate , "d MMMM, yyyy" ) : "" ;
39
+ const convertedDate = date ? new Date ( date ) : false ;
40
40
41
+ const formattedDate = isDate ( convertedDate )
42
+ ? format ( convertedDate , "d MMMM, yyyy" )
43
+ : "" ;
41
44
42
45
return (
43
- < 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" >
46
+ < 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 " >
44
47
< div className = "flex flex-col md:flex-row flex-wrap gap-4 justify-between " >
45
48
< h4 className = "text-orange-custom-100 text-xl font-bold md:text-2xl 2xl:text-[2rem]" >
46
49
{ title }
47
50
</ h4 >
48
51
< button
49
52
onClick = { handleShowDetail }
50
- 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"
53
+ className = "text-black dark:text-gray-custom-100
54
+ text-sm lg:text-base gap-1 py-1.5 2xl:py-2 px-5 flex items-center border
55
+ w-[149px] md:w-[154px] rounded-lg border-gray-custom-1100 whitespace-nowrap"
51
56
>
52
57
{ showDetail ? (
53
58
< >
54
- < Image
55
- src = "/svgs/eye-close-icon.svg"
56
- alt = "eye close icon"
57
- width = { 24 }
58
- height = { 24 }
59
- className = "w-5"
60
- />
59
+ < EyeClose className = "w-5 dark:text-gray-custom-100" />
61
60
< span className = "font-medium text-sm 2xl:text-base" >
62
61
Hide Details{ " " }
63
62
</ span >
64
63
</ >
65
64
) : (
66
65
< >
67
- < Image
68
- src = "/svgs/eye-open-icon.svg"
69
- alt = "eye open icon"
70
- width = { 24 }
71
- height = { 24 }
72
- className = "w-5"
73
- />
74
- < span className = "font-medium" > Show Details</ span >
66
+ < EyeOpen className = "w-5 dark:text-gray-custom-100" />
67
+ < span className = "font-medium text-sm 2xl:text-base" >
68
+ Show Details
69
+ </ span >
75
70
</ >
76
71
) }
77
72
</ button >
@@ -82,70 +77,81 @@ const TranscriptMetadataComponent = ({
82
77
< MetadataBlock
83
78
header = {
84
79
< >
85
- < CalendarIcon width = { "19px" } color = "#141B34" />
80
+ < CalendarIcon width = { "19px" } />
86
81
< p className = "text-base lg:text-lg font-semibold" > Date</ p >
87
82
</ >
88
83
}
89
84
footer = {
90
85
< div className = "pl-2.5" >
91
- { formattedDate ?
92
- < p className = "text-xs md:text-sm lg:text-base 2xl:text-lg md:font-medium" >
93
- { formattedDate }
94
- </ p > :
95
- < p className = "pt-1.5 text-xs md:text-sm lg:text-sm 2xl:text-base md:font-medium" > Not available</ p >
96
- }
86
+ { formattedDate ? (
87
+ < p className = "text-xs md:text-sm lg:text-base 2xl:text-lg md:font-medium" >
88
+ { formattedDate }
89
+ </ p >
90
+ ) : (
91
+ < p className = "pt-1.5 text-xs md:text-sm lg:text-sm 2xl:text-base md:font-medium" >
92
+ Not available
93
+ </ p >
94
+ ) }
97
95
</ div >
98
96
}
99
97
/>
100
98
{ /* render only 3 tags*/ }
101
99
< MetadataBlock
102
100
header = {
103
101
< >
104
- < BookmarkIcon width = { "19px" } color = "#000000" />
102
+ < BookmarkIcon width = { "19px" } />
105
103
< p className = "text-base lg:text-lg font-semibold" > Topics</ p >
106
104
</ >
107
105
}
108
106
footer = {
109
107
< div className = "flex flex-wrap gap-2" >
110
- { ( topics && topics . length > 0 ) ?
108
+ { topics && topics . length > 0 ? (
111
109
topics . map ( ( topic ) => (
112
- < Pill key = { topic . slug } name = { topic . name } slug = { `/tags/${ topic . slug } ` } />
113
- ) ) :
114
- < 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 >
115
- }
110
+ < Pill
111
+ key = { topic . slug }
112
+ name = { topic . name }
113
+ slug = { `/tags/${ topic . slug } ` }
114
+ />
115
+ ) )
116
+ ) : (
117
+ < p className = "pl-2.5 pt-1.5 text-xs md:text-sm lg:text-sm 2xl:text-base md:font-medium" >
118
+ Not available
119
+ </ p >
120
+ ) }
116
121
</ div >
117
122
}
118
123
/>
119
124
120
125
< MetadataBlock
121
126
header = {
122
127
< >
123
- < MicIcon width = { "19px" } color = "#000000" />
128
+ < MicIcon width = { "19px" } />
124
129
< p className = "text-base lg:text-lg font-semibold" > Speakers</ p >
125
130
</ >
126
131
}
127
132
footer = {
128
133
< div className = "flex flex-wrap gap-2" >
129
- { speakers && speakers . length > 0 ?
134
+ { speakers && speakers . length > 0 ? (
130
135
speakers . map ( ( speaker ) => (
131
- < Pill key = { speaker } name = { speaker } slug = { `/speakers/${ createSlug ( speaker ) } ` } />
132
- ) ) :
133
- < 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 >
134
- }
136
+ < Pill
137
+ key = { speaker }
138
+ name = { speaker }
139
+ slug = { `/speakers/${ createSlug ( speaker ) } ` }
140
+ />
141
+ ) )
142
+ ) : (
143
+ < p className = "pl-2.5 pt-1.5 text-xs md:text-sm lg:text-sm 2xl:text-base md:font-medium" >
144
+ Not available
145
+ </ p >
146
+ ) }
135
147
</ div >
136
148
}
137
149
/>
138
150
139
151
< MetadataBlock
140
152
header = {
141
153
< >
142
- < Image
143
- src = "/svgs/pencil-icon.svg"
144
- alt = "pencil icon"
145
- width = { 24 }
146
- height = { 24 }
147
- className = "w-5"
148
- />
154
+ < PencilIcon className = "w-5 dark:text-gray-custom-100" />
149
155
< p className = "text-base lg:text-lg font-semibold" >
150
156
Transcript by
151
157
</ p >
@@ -155,12 +161,12 @@ const TranscriptMetadataComponent = ({
155
161
< div className = "pl-5 pt-1.5 flex items-center " >
156
162
{ isAiGenerated ? (
157
163
< >
158
- < a href = "https://review.btctranscripts.com/" className = "text-blue-custom-100 no-underline border-b border-blue-custom-100 max-w-[max-content] text-sm 2xl:text-base flex gap-1 items-start cursor-pointer" >
159
- < AiGeneratedIcon className = "-mt-0.5" />
160
- < span >
161
- AI Generated (Review for sats)
162
- </ span >
163
-
164
+ < a
165
+ href = "https://review.btctranscripts.com/"
166
+ className = "text-blue-custom-100 no-underline border-b border-blue-custom-100 max-w-[max-content] text-sm 2xl:text-base flex gap-1 items-start cursor-pointer"
167
+ >
168
+ < AiGeneratedIcon className = "-mt-0.5" / >
169
+ < span > AI Generated (Review for sats) </ span >
164
170
</ a > { " " }
165
171
</ >
166
172
) : (
0 commit comments