mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
refactor
This commit is contained in:
parent
ca83ddab3b
commit
f85e32b9c5
@ -13,6 +13,7 @@ import useFile from "src/store/useFile";
|
||||
export const SchemaModal = ({ opened, onClose }: ModalProps) => {
|
||||
const setContents = useFile(state => state.setContents);
|
||||
const setJsonSchema = useFile(state => state.setJsonSchema);
|
||||
const darkmodeEnabled = useConfig(state => (state.darkmodeEnabled ? "vs-dark" : "light"));
|
||||
const [schema, setSchema] = React.useState(
|
||||
JSON.stringify(
|
||||
{
|
||||
@ -32,7 +33,6 @@ export const SchemaModal = ({ opened, onClose }: ModalProps) => {
|
||||
2
|
||||
)
|
||||
);
|
||||
const darkmodeEnabled = useConfig(state => (state.darkmodeEnabled ? "vs-dark" : "light"));
|
||||
|
||||
const onApply = () => {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user