clear storage on clear fired

This commit is contained in:
Aykut Saraç 2022-02-09 20:56:20 +03:00
parent d45a5a06df
commit 9802e88838

View File

@ -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