fix: missing transitions to useDialog

This commit is contained in:
Zoe
2026-02-28 17:20:27 -06:00
parent 874f0f7397
commit a2891e0461
3 changed files with 4 additions and 17 deletions
+1 -13
View File
@@ -1,15 +1,8 @@
export const useSettings = () => {
const open = useState<boolean>('settings:open', () => false);
const currentPage = useState('settings-page', () => 'general');
const pageParams = useState('settings-params', () => [] as string[]);
const toggle = () => {
open.value = !open.value;
};
const setPage = (id: string, params?: string | string[]) => {
if (open.value === false) toggle();
currentPage.value = id;
if (params) {
if (typeof params === 'string') {
@@ -21,10 +14,5 @@ export const useSettings = () => {
}
};
const close = () => {
open.value = false;
currentPage.value = 'page1';
};
return { open, currentPage, pageParams, toggle, setPage, close };
return { open, currentPage, pageParams, setPage };
};