import React from 'react' ; import { Link , Route } from 'wouter' ; import Minimal from './sandboxes/yogan-react/src/App' ; import PPNative from './sandboxes/yogan-react-postprocess-native/src/App' ; import styles from './styles.module.css' ; const links = { 'yogan-minimal' : Minimal , 'yogan-postprocess-native' : PPNative , } ; const Example = ( { link } ) => { const Component = links [ link ] ; return ( < div > < Link href = "/" > { } < a className = { styles . back } > ← Back < /a> < /Link> < Component / > < /div>); } ; export default function App ( ) { return ( < > < Route path = "/" > < h1 > Leva demos < /h1> < h2 > Sandboxes < /h2> < div className = { styles . linkList } > { Object . keys ( links ) . map ( ( link ) => ( < Link key = { link } href = { `/${ link }` } > { } < a className = { styles . link } > { link } < /a> < /Link>))} < /div> < /Route> < Route path = "/:link" > { ( params ) => < Example link = { params . link } />}</Route > < />); }