From 21da78f0f2210ea8fd49a896bc55f8158560b84a Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Sat, 27 Apr 2024 23:55:19 +0500 Subject: [PATCH] frontend: add functions to remove searches and theme --- frontend/app/components/Settings/Settings.jsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/Settings/Settings.jsx b/frontend/app/components/Settings/Settings.jsx index 40d64be..27861e3 100644 --- a/frontend/app/components/Settings/Settings.jsx +++ b/frontend/app/components/Settings/Settings.jsx @@ -1,3 +1,14 @@ +"use client"; + +function deleteAllSettings() { + localStorage.removeItem("mode"); + localStorage.removeItem("theme"); +} + +function deleteSearchHistory() { + localStorage.removeItem("searches"); +} + export default function Settings() { return ( <> @@ -7,21 +18,21 @@ export default function Settings() { >
Настройки