Flush storage

This commit is contained in:
1ilit
2023-11-24 19:13:49 +02:00
parent 76ef62d13f
commit 0cbc4bb6f8
2 changed files with 13 additions and 14 deletions

View File

@@ -3,21 +3,9 @@ import { Link } from "react-router-dom";
import { IconCrossStroked } from "@douyinfe/semi-icons";
import Navbar from "../components/Navbar";
import { db } from "../data/db";
export default function LandingPage() {
const [showSurvey, setShowSurvey] = useState(true);
const clearDatabase = () => {
db.delete()
.then(() => {
console.log("Database cleared.");
})
.catch((error) => {
console.error("Failed to clear the database:", error);
});
};
useEffect(() => {
document.body.setAttribute("theme-mode", "light");
document.title =
@@ -39,7 +27,6 @@ export default function LandingPage() {
</div>
)}
<Navbar />
<button onClick={clearDatabase}>delete db</button>
</div>
);
}