You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
749 B
24 lines
749 B
import { usePrimaryPage } from '@/contexts/primary-page-context' |
|
import { usePrimaryNoteView } from '@/contexts/primary-note-view-context' |
|
import { Wand2 } from 'lucide-react' |
|
import BottomNavigationBarItem from './BottomNavigationBarItem' |
|
|
|
export default function SpellsButton() { |
|
const { navigate, current, display } = usePrimaryPage() |
|
const { primaryViewType, setPrimaryNoteView } = usePrimaryNoteView() |
|
|
|
return ( |
|
<BottomNavigationBarItem |
|
active={current === 'spells' && display && primaryViewType === null} |
|
onClick={() => { |
|
if (primaryViewType !== null) { |
|
setPrimaryNoteView(null) |
|
} else { |
|
navigate('spells') |
|
} |
|
}} |
|
> |
|
<Wand2 /> |
|
</BottomNavigationBarItem> |
|
) |
|
}
|
|
|