Skip to content

Commit

Permalink
fix: button changes tabs onClick
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Victor committed Mar 28, 2023
1 parent c5f1bb4 commit e04b8ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/inc/GalleryTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ const GalleryTabs = () => {
<Flex gap="1" css={{ pb: "$2" }}>
{galleryTabs.map(({ value, name }) => {
return (
<TabTrigger key={name} value={value} asChild>
<GalleryBtn onClick={() => setActiveTab(value)}>
<TabTrigger
key={name}
value={value}
onClick={() => setActiveTab(value)}
asChild
>
<GalleryBtn>
{name}
{value === activeTab && (
<GalleryBtnUnderline layoutId="gallery-btn-underline" />
Expand Down

0 comments on commit e04b8ad

Please sign in to comment.