mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-20 05:12:54 +08:00
clear storage on clear fired
This commit is contained in:
parent
d45a5a06df
commit
9802e88838
@ -142,7 +142,14 @@ export const Sidebar: React.FC<{
|
|||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
</StyledElement>
|
</StyledElement>
|
||||||
<StyledElement as="a" onClick={() => setJson("[]")} title="Clear JSON">
|
<StyledElement
|
||||||
|
as="a"
|
||||||
|
onClick={() => {
|
||||||
|
setJson("[]");
|
||||||
|
localStorage.removeItem("json");
|
||||||
|
}}
|
||||||
|
title="Clear JSON"
|
||||||
|
>
|
||||||
<AiOutlineClear />
|
<AiOutlineClear />
|
||||||
</StyledElement>
|
</StyledElement>
|
||||||
<StyledElement
|
<StyledElement
|
||||||
|
Loading…
x
Reference in New Issue
Block a user