/* ==========================================================
YAPPY. — App: router, tweaks
========================================================== */
function Routes({ path }) {
if (path === '/' || path === '') return ;
if (path === '/shop') return ;
if (path.startsWith('/product/')) return ;
if (path === '/checkout') return ;
if (path.startsWith('/order/')) return ;
if (path === '/account') return ;
if (path === '/consult') return ;
if (path === '/how-it-works') return ;
if (path === '/standards') return ;
if (path === '/faq') return ;
if (path === '/learn') return ;
if (path === '/support') return ;
if (path.startsWith('/policy/')) return ;
return ;
}
const JUMPS = [
['Home', '/'], ['Shop', '/shop'], ['Product · BRB.', '/product/brb'], ['Product · DND.', '/product/dnd'], ['Product · OFFLINE.', '/product/offline'],
['Checkout', '/checkout'], ['My orders', '/account'], ['Free consultation', '/consult'], ['How it works', '/how-it-works'], ['FAQs', '/faq'], ['Standards', '/standards'], ['Support', '/support'],
];
function Shell() {
const path = useRoute();
const { cartOpen } = useStore();
return (
<>
{cartOpen && }
>
);
}
function TweaksBits({ path }) {
const [t, setTweak] = useTweaks(window.TWEAK_DEFAULTS);
const { reset } = useStore();
return (
<>
{t.showRibbon && }
setTweak('showRibbon', v)} />
j[1] === path) ? path : '/'} options={JUMPS.map(([l, v]) => ({ value: v, label: l }))} onChange={(v) => go(v)} />
window.open('Yappy Admin.html', '_blank')} />
>
);
}
function App() {
return ;
}
ReactDOM.createRoot(document.getElementById('root')).render();