Skip to content

Commit da29047

Browse files
committed
Do not display Show less
1 parent 0973728 commit da29047

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/components/learn-aggregator/index.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,16 @@ export function TeaserSection({
8383
)
8484
})}
8585
</ul>
86-
<Button
87-
className="mt-4 w-full lg:mt-8"
88-
variant="secondary"
89-
onClick={() => showMore(s => !s)}
90-
>
91-
Show {!showingMore ? "more" : "less"}
92-
</Button>
86+
{!showingMore && (
87+
<Button
88+
className="mt-4 w-full lg:mt-8"
89+
variant="secondary"
90+
onClick={() => showMore(true)}
91+
>
92+
{/* we don't display "Show less" because scroll restoriation is not worth the effort, and the user already scrolled to the next section */}
93+
Show more
94+
</Button>
95+
)}
9396
</div>
9497
</section>
9598
)

0 commit comments

Comments
 (0)