Skip to content

Commit 9d87491

Browse files
committed
feat: hide slide button if there is no slide
1 parent bacb25b commit 9d87491

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

app/(website)/(pages)/_components/SessionPopup.tsx

+12-9
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,18 @@ const SessionPopup = ({ openSessionId }: { openSessionId: string | null }) => {
179179
>
180180
即時提問
181181
</button>
182-
<button
183-
onClick={() => {
184-
if (session.slide)
185-
window.open(session.slide, "_blank");
186-
}}
187-
className="flex-grow text-nowrap rounded-full bg-[#B9D3E6] px-3 py-2 text-center text-[16px] font-bold transition-colors hover:bg-[#A1C7E0]"
188-
>
189-
簡報連結
190-
</button>
182+
{session.slide && (
183+
<button
184+
onClick={() => {
185+
if (session.slide)
186+
window.open(session.slide, "_blank");
187+
}}
188+
className="flex-grow text-nowrap rounded-full bg-[#B9D3E6] px-3 py-2 text-center text-[16px] font-bold transition-colors hover:bg-[#A1C7E0]"
189+
>
190+
簡報連結
191+
</button>
192+
)}
193+
191194
<button
192195
onClick={() => {
193196
if (session.co_write)

0 commit comments

Comments
 (0)