mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-25 19:23:45 +02:00
fix clear internal database
This commit is contained in:
8
src/views/relays/cache/index.tsx
vendored
8
src/views/relays/cache/index.tsx
vendored
@@ -5,7 +5,6 @@ import {
|
||||
Button,
|
||||
ButtonGroup,
|
||||
ButtonGroupProps,
|
||||
ButtonProps,
|
||||
Card,
|
||||
CardBody,
|
||||
CardFooter,
|
||||
@@ -22,16 +21,15 @@ import {
|
||||
Text,
|
||||
useDisclosure,
|
||||
} from "@chakra-ui/react";
|
||||
import { CacheRelay } from "nostr-idb";
|
||||
import { CacheRelay, clearDB } from "nostr-idb";
|
||||
import { Link as RouterLink } from "react-router-dom";
|
||||
|
||||
import BackButton from "../../../components/router/back-button";
|
||||
import { NOSTR_RELAY_TRAY_URL, checkNostrRelayTray, localRelay } from "../../../services/local-relay";
|
||||
import { NOSTR_RELAY_TRAY_URL, checkNostrRelayTray, localDatabase, localRelay } from "../../../services/local-relay";
|
||||
import { ChevronDownIcon, ChevronUpIcon } from "../../../components/icons";
|
||||
import WasmRelay from "../../../services/wasm-relay";
|
||||
import MemoryRelay from "../../../classes/memory-relay";
|
||||
import Trash01 from "../../../components/icons/trash-01";
|
||||
import { deleteDatabase } from "../../../services/db";
|
||||
|
||||
function EnableWithDelete({
|
||||
enable,
|
||||
@@ -78,7 +76,7 @@ function InternalRelay() {
|
||||
};
|
||||
|
||||
const wipe = async () => {
|
||||
await deleteDatabase();
|
||||
await clearDB(localDatabase);
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user