11import React , { useState , useEffect , useMemo , useRef } from "react" ;
2- import { useParams , useLocation } from "react-router-dom" ;
2+ import { useParams , useLocation , useNavigate } from "react-router-dom" ;
33import { HexColorPicker , HexColorInput } from "react-colorful" ;
44import { render } from "@abstractplay/renderer" ;
55import { gameinfo } from "@abstractplay/gameslib" ;
@@ -10,6 +10,7 @@ import { isEqual, cloneDeep } from "lodash";
1010function Customize ( props ) {
1111 const params = useParams ( ) ;
1212 const location = useLocation ( ) ;
13+ const navigate = useNavigate ( ) ;
1314 const providedMetaGame = props . metaGame || params . metaGame ;
1415 const [ scope , setScope ] = useState ( "game" ) ;
1516 const metaGame =
@@ -308,6 +309,14 @@ function Customize(props) {
308309
309310 return (
310311 < div className = "container" >
312+ < div style = { { marginBottom : "1em" } } >
313+ < button className = "button is-small" onClick = { ( ) => navigate ( - 1 ) } >
314+ < span className = "icon" >
315+ < i className = "fa fa-arrow-left" > </ i >
316+ </ span >
317+ < span > Back</ span >
318+ </ button >
319+ </ div >
311320 < h1 className = "title" > Customize Settings for { gameName } </ h1 >
312321 { providedMetaGame && providedMetaGame !== "_default" && (
313322 < div className = "tabs is-toggle is-centered is-small" >
0 commit comments