export to json
This commit is contained in:
parent
e450020cda
commit
a743eca07f
@ -9,10 +9,16 @@ function App() {
|
||||
|
||||
return (
|
||||
<div className="text-white">
|
||||
<MenuBar onExport={()=>{
|
||||
const exportString = retakesConfig.toCvar()
|
||||
console.log(exportString)
|
||||
}} />
|
||||
<MenuBar
|
||||
onExport={()=>{
|
||||
const exportString = retakesConfig.toCvar()
|
||||
console.log(exportString)
|
||||
}}
|
||||
onExportJson={()=>{
|
||||
const jsonString = JSON.stringify(retakesConfig)
|
||||
console.log(jsonString)
|
||||
}}
|
||||
/>
|
||||
<AllDecks retakesConfig={retakesConfig} onChange={(newConfig)=>setRetakesConfig(newConfig)} />
|
||||
</div>
|
||||
);
|
||||
|
@ -2,14 +2,18 @@ import React from "react"
|
||||
|
||||
interface Props {
|
||||
onExport?: ()=>void
|
||||
onExportJson?: ()=>void
|
||||
}
|
||||
|
||||
const MenuBar: React.FC<Props> = ({onExport}) => {
|
||||
const MenuBar: React.FC<Props> = ({onExport,onExportJson}) => {
|
||||
return (
|
||||
<div className="bg-gray-800 h-10 m-1 p-1 flex">
|
||||
<div className="bg-gray-700 button" onClick={onExport}>
|
||||
Export
|
||||
</div>
|
||||
<div className="bg-gray-700 button" onClick={onExportJson}>
|
||||
Export to JSON
|
||||
</div>
|
||||
<a href="https://developer.valvesoftware.com/wiki/CS:GO_Game_Mode_-_Retakes" target="_blank" rel='noreferrer'>
|
||||
<div className="bg-gray-700 button">
|
||||
Help
|
||||
|
Loading…
Reference in New Issue
Block a user