* fix: resolve lint warnings/errors and apply formatting Fix 10 oxlint issues (2 errors, 8 warnings): - Remove unused catch parameters in Security.tsx and ImportDialog.tsx - Remove stray expression in Generator.tsx - Add eslint-disable for debounced useCallback in FilterControl.tsx - Remove unnecessary deps (resolveDB, store) in bindStoreToDevice.ts - Prefix unused variant param in AppSidebar.tsx - Memoize tabs arrays in DeviceConfig, RadioConfig, ModuleConfig - Fix channels type in RadioConfig TabItem Also applies oxfmt formatting across all files. * updating lock file * update protobuf package * fix: regenerate pnpm-lock.yaml and exclude jsr protobufs from minimumReleaseAge * prevented http card from always being polled * updated pnpm config fiile * updated actions * removed biome config and lint system leftovers * updating protobuf package
33 lines
870 B
TypeScript
33 lines
870 B
TypeScript
import { clearAllStores } from "@core/stores";
|
|
import { useTranslation } from "react-i18next";
|
|
import { DialogWrapper } from "../DialogWrapper.tsx";
|
|
|
|
export interface ClearAllStoresDialogProps {
|
|
open: boolean;
|
|
onOpenChange: (open: boolean) => void;
|
|
}
|
|
|
|
export const ClearAllStoresDialog = ({ open, onOpenChange }: ClearAllStoresDialogProps) => {
|
|
const { t } = useTranslation("dialog");
|
|
|
|
const handleClearAllStores = () => {
|
|
clearAllStores();
|
|
|
|
// Reload the app to ensure all state is cleared
|
|
window.location.href = "/";
|
|
};
|
|
|
|
return (
|
|
<DialogWrapper
|
|
open={open}
|
|
onOpenChange={onOpenChange}
|
|
type="confirm"
|
|
variant="destructive"
|
|
title={t("clearAllStores.title")}
|
|
description={t("clearAllStores.description")}
|
|
confirmText={t("clearAllStores.confirm")}
|
|
onConfirm={handleClearAllStores}
|
|
/>
|
|
);
|
|
};
|