Skip to content

Commit

Permalink
Update ContentRendererClient.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
TanmayDhobale authored Apr 15, 2024
1 parent 010432f commit 85f434e
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/components/admin/ContentRendererClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,31 +137,25 @@ export const ContentRendererClient = ({
<div>
{/* <QualitySelector /> */}
<br />
{metadata.slides ? (

{!showChapters && metadata.segments?.length > 0 && (
<div
style={{
display: 'flex',
flexDirection: 'row-reverse',
gap: '10px',
}}
>
<a href={metadata.slides} target="_blank">
<button className="bg-blue-500 hover:bg-blue-700 text-white font-bold rounded p-2">
Slides
</button>
</a>
<button
className="bg-blue-500 hover:bg-blue-700 text-white font-bold rounded p-2 my-6 lg:my-4"
onClick={() => {
scrollTo({ top: 0, behavior: 'smooth' });
toggleShowChapters();
}}
>
View All Chapters
</button>
</div>
) : null}
{!showChapters && metadata.segments?.length > 0 && (
<button
className="bg-blue-500 hover:bg-blue-700 text-white font-bold rounded p-2"
onClick={() => {
scrollTo({ top: 0, behavior: 'smooth' });
toggleShowChapters();
}}
>
View All Chapters
</button>
)}
</div>
</div>
Expand Down

0 comments on commit 85f434e

Please sign in to comment.