diff --git a/src/components/App.tsx b/src/components/App.tsx index dd17ecc..affb249 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -9,10 +9,16 @@ function App() { return (
- { - const exportString = retakesConfig.toCvar() - console.log(exportString) - }} /> + { + const exportString = retakesConfig.toCvar() + console.log(exportString) + }} + onExportJson={()=>{ + const jsonString = JSON.stringify(retakesConfig) + console.log(jsonString) + }} + /> setRetakesConfig(newConfig)} />
); diff --git a/src/components/MenuBar.tsx b/src/components/MenuBar.tsx index 47dd3d0..f6314a8 100644 --- a/src/components/MenuBar.tsx +++ b/src/components/MenuBar.tsx @@ -2,14 +2,18 @@ import React from "react" interface Props { onExport?: ()=>void + onExportJson?: ()=>void } -const MenuBar: React.FC = ({onExport}) => { +const MenuBar: React.FC = ({onExport,onExportJson}) => { return (
Export
+
+ Export to JSON +
Help