@@ -74,79 +74,77 @@ const SpeakerYoutubePublishButton = ({
74
74
} ;
75
75
76
76
return (
77
- < div >
78
- < Dialog open = { open } onOpenChange = { setOpen } >
79
- < Button className = "bg-[#FF0000]" onClick = { ( ) => setOpen ( true ) } >
80
- < SiYoutube className = "mr-2" /> Publish to Youtube
81
- </ Button >
82
- < DialogContent >
83
- < DialogTitle className = "font-bold" >
84
- Publish Video to Youtube{ ' ' }
85
- </ DialogTitle >
86
- { refreshToken ? (
87
- < div className = "flex items-center pr-3" >
88
- < Image
89
- src = { thumbnail }
90
- className = "p-1 mr-2 rounded-full"
91
- width = { 50 }
92
- height = { 50 }
93
- alt = ""
94
- />
95
- < Link
96
- className = "text-sm underline"
97
- href = { `/api/google/request?state=${ state } ` }
98
- >
99
- Click to Reconnect
100
- </ Link >
101
- </ div >
102
- ) : (
103
- < div >
104
- < p className = "mb-2" > Connect Youtube Account before continuing </ p >
105
- < div className = "flex gap-4 items-center" >
106
- < Button
107
- onClick = { handleModalClose }
108
- className = "w-full"
109
- variant = { 'outline' }
110
- >
111
- Cancel
112
- </ Button >
113
- < Link
114
- className = "w-full"
115
- href = { `/api/google/request?state=${ state } ` }
116
- >
117
- < Button className = "w-full" variant = { 'primary' } >
118
- Connect
119
- </ Button >
120
- </ Link >
121
- </ div >
122
- </ div >
123
- ) }
124
-
125
- { refreshToken && (
126
- < div className = "flex gap-4 items-center w-full" >
77
+ < Dialog open = { open } onOpenChange = { setOpen } >
78
+ < Button className = "bg-[#FF0000]" onClick = { ( ) => setOpen ( true ) } >
79
+ < SiYoutube className = "mr-2" /> Publish to Youtube
80
+ </ Button >
81
+ < DialogContent >
82
+ < DialogTitle className = "font-bold" >
83
+ Publish Video to Youtube{ ' ' }
84
+ </ DialogTitle >
85
+ { refreshToken ? (
86
+ < div className = "flex items-center pr-3" >
87
+ < Image
88
+ src = { thumbnail }
89
+ className = "p-1 mr-2 rounded-full"
90
+ width = { 50 }
91
+ height = { 50 }
92
+ alt = ""
93
+ />
94
+ < Link
95
+ className = "text-sm underline"
96
+ href = { `/api/google/request?state=${ state } ` }
97
+ >
98
+ Click to Reconnect
99
+ </ Link >
100
+ </ div >
101
+ ) : (
102
+ < div >
103
+ < p className = "mb-2" > Connect Youtube Account before continuing </ p >
104
+ < div className = "flex gap-4 items-center" >
127
105
< Button
128
106
onClick = { handleModalClose }
129
107
className = "w-full"
130
108
variant = { 'outline' }
131
109
>
132
110
Cancel
133
111
</ Button >
134
- < Button
135
- variant = "primary"
136
- className = "overflow-hidden w-full"
137
- onClick = { ( ) => {
138
- track ( 'Upload to YouTube' , { location : 'Speaker Page' } ) ;
139
- handleYoutubePublish ( ) ;
140
- } }
141
- loading = { isLoading }
112
+ < Link
113
+ className = "w-full"
114
+ href = { `/api/google/request?state=${ state } ` }
142
115
>
143
- Publish
144
- </ Button >
116
+ < Button className = "w-full" variant = { 'primary' } >
117
+ Connect
118
+ </ Button >
119
+ </ Link >
145
120
</ div >
146
- ) }
147
- </ DialogContent >
148
- </ Dialog >
149
- </ div >
121
+ </ div >
122
+ ) }
123
+
124
+ { refreshToken && (
125
+ < div className = "flex gap-4 items-center w-full" >
126
+ < Button
127
+ onClick = { handleModalClose }
128
+ className = "w-full"
129
+ variant = { 'outline' }
130
+ >
131
+ Cancel
132
+ </ Button >
133
+ < Button
134
+ variant = "primary"
135
+ className = "overflow-hidden w-full"
136
+ onClick = { ( ) => {
137
+ track ( 'Upload to YouTube' , { location : 'Speaker Page' } ) ;
138
+ handleYoutubePublish ( ) ;
139
+ } }
140
+ loading = { isLoading }
141
+ >
142
+ Publish
143
+ </ Button >
144
+ </ div >
145
+ ) }
146
+ </ DialogContent >
147
+ </ Dialog >
150
148
) ;
151
149
} ;
152
150
0 commit comments