mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-14 04:14:04 +00:00
add available positions to mobile nav (#613)
This commit is contained in:
parent
e874aed431
commit
1694b09057
|
@ -22,9 +22,12 @@ function NavLink(props: PropsWithChildren<{ link?: string }>) {
|
|||
}
|
||||
|
||||
function link(path: string) {
|
||||
const selected = getWindow()?.location.href.includes(path);
|
||||
|
||||
return {
|
||||
selected: getWindow()?.location.href.includes(path),
|
||||
onClick: () => router.navigate(path)
|
||||
selected,
|
||||
onClick: () => router.navigate(path),
|
||||
className: clsx(selected && 'bg-accent/20')
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -114,6 +117,11 @@ export default function NavBar() {
|
|||
</Dropdown.Item>
|
||||
<Dropdown.Item icon={Academia} {...link('/careers')}>
|
||||
Careers
|
||||
{positions.length > 0 ? (
|
||||
<span className="bg-primary ml-2 rounded-md px-[5px] py-px text-xs">
|
||||
{positions.length}
|
||||
</span>
|
||||
) : null}
|
||||
</Dropdown.Item>
|
||||
</Dropdown.Section>
|
||||
</Dropdown.Root>
|
||||
|
|
Loading…
Reference in a new issue