Skip to content

Commit 44ad1c1

Browse files
xannyxsMario-SO
andauthored
Merge with production (#886)
Co-authored-by: mariodev <gh_mario.proclaim@slmail.me>
1 parent c456671 commit 44ad1c1

File tree

3 files changed

+64
-66
lines changed

3 files changed

+64
-66
lines changed

packages/app/app/speaker/[session]/components/SpeakerYoutubePublishButton.tsx

Lines changed: 62 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -74,79 +74,77 @@ const SpeakerYoutubePublishButton = ({
7474
};
7575

7676
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">
127105
<Button
128106
onClick={handleModalClose}
129107
className="w-full"
130108
variant={'outline'}
131109
>
132110
Cancel
133111
</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}`}
142115
>
143-
Publish
144-
</Button>
116+
<Button className="w-full" variant={'primary'}>
117+
Connect
118+
</Button>
119+
</Link>
145120
</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>
150148
);
151149
};
152150

packages/app/app/speaker/[session]/components/ZoraUploadButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const ZoraUploadButton = ({
168168
}, [publicClient, address, session, writeContract, switchChain]);
169169

170170
if (!isConnected) {
171-
return <ConnectWalletButton />;
171+
return <ConnectWalletButton btnText="Upload to Zora" />;
172172
}
173173

174174
const isDisabled = isUploading || state?.length > 0;

packages/app/app/speaker/[session]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const SessionPage = async ({
9494
video={session!}
9595
/>
9696

97-
<div className="flex space-x-2">
97+
<div className="flex flex-col space-y-2 sm:flex-row sm:space-y-0 sm:space-x-2">
9898
<SpeakerYoutubePublishButton
9999
openModal={searchParams.m}
100100
sessionId={params.session}

0 commit comments

Comments
 (0)