Skip to content

Commit

Permalink
fix footer
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalmi committed Aug 2, 2023
1 parent 12dffbd commit 01d0b33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
PlusCircleIcon as PlusCircleIconFull,
} from '@heroicons/react/24/solid';
import { useEffect, useState } from 'preact/hooks';
import { Link } from 'preact-router';

import Icons from '../Icons';
import localState from '../LocalState';
Expand Down Expand Up @@ -40,14 +41,14 @@ const Footer = () => {
const isActive = new RegExp(`^${href}(/|$)`).test(activeRoute);

return (
<a className={`btn flex-grow ${isActive ? 'active' : ''}`}>
<Link href={href} className={`btn flex-grow ${isActive ? 'active' : ''}`}>
<Show when={isActive}>
<IconActive width={24} />
</Show>
<Show when={!isActive}>
<Icon width={24} />
</Show>
</a>
</Link>
);
};

Expand Down

0 comments on commit 01d0b33

Please sign in to comment.