mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-20 05:12:54 +08:00
fix toggle private
This commit is contained in:
parent
4ed3411f86
commit
6c270635ac
@ -78,8 +78,6 @@ export const BottomBar = () => {
|
||||
const [isPrivate, setIsPrivate] = React.useState(true);
|
||||
|
||||
React.useEffect(() => {
|
||||
console.log(data);
|
||||
|
||||
setIsPrivate(data?.data.private ?? true);
|
||||
}, [data]);
|
||||
|
||||
@ -107,6 +105,7 @@ export const BottomBar = () => {
|
||||
|
||||
const setPrivate = () => {
|
||||
if (!query.json) return handleSaveJson();
|
||||
setIsPrivate(!isPrivate);
|
||||
updateJson(query.json as string, { private: !isPrivate });
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user