Remove useNavigate everywhere, and make request a query param. And convert dialog to Jotai

This commit is contained in:
Gregory Schier
2025-01-06 16:54:07 -08:00
parent 806a8eb801
commit bc50891edb
54 changed files with 592 additions and 545 deletions

View File

@@ -1,11 +1,10 @@
import { useCallback } from 'react';
import { CommandPaletteDialog } from '../components/CommandPaletteDialog';
import { useDialog } from './useDialog';
import { toggleDialog } from '../lib/dialog';
export function useToggleCommandPalette() {
const dialog = useDialog();
const togglePalette = useCallback(() => {
dialog.toggle({
toggleDialog({
id: 'command_palette',
size: 'dynamic',
hideX: true,
@@ -15,7 +14,7 @@ export function useToggleCommandPalette() {
noScroll: true,
render: ({ hide }) => <CommandPaletteDialog onClose={hide} />,
});
}, [dialog]);
}, []);
return togglePalette;
}