Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
talseku committed Nov 6, 2024
1 parent cecf362 commit 50f44b0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/components/club/directory/TagFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ const TagFilter = ({ tags }: { tags: string[] }) => {
const scrollContainerRef = useRef<HTMLDivElement>(null);
const setSelected = (tag: string) =>
router.replace(`/?tag=${tag}`, { scroll: false });
const deselect = (tag: string) =>
router.replace(`/`, { scroll: false });
const deselect = (tag: string) => router.replace(`/`, { scroll: false });

const handleScrollLeft = () => {
const container = scrollContainerRef.current;
Expand Down Expand Up @@ -48,12 +47,9 @@ const TagFilter = ({ tags }: { tags: string[] }) => {
? 'bg-blue-primary text-white hover:bg-blue-700'
: 'bg-gray-100 text-slate-600 hover:bg-gray-200'
} whitespace-nowrap rounded-3xl px-8 py-4 text-sm font-extrabold transition-colors duration-200 focus:outline-none md:text-xs`}
onClick={() =>
{
selectedTag === tag
? deselect(tag)
: setSelected(tag)
}}
onClick={() => {
selectedTag === tag ? deselect(tag) : setSelected(tag);
}}
>
{tag}
</button>
Expand Down

0 comments on commit 50f44b0

Please sign in to comment.