import { useState, useEffect } from 'react' const baseUrl = typeof window !== 'undefined' ? window.location.origin : process.env.VITE_VERCEL_URL || 'http://localhost:5173'; // Fallback for your server env const st = await fetch(`${baseUrl}/characters/collateral/stats.json`) .then(r => r.json()); const sk = await fetch(`${baseUrl}/characters/collateral/skills.json`) .then(r => r.json()); export function Welcome() { const [stats, setStats] = useState(st); const [skills, setSkills] = useState(sk) return (
STAT SCORE
INT {stats.int}
REF {stats.ref}
DEX {stats.dex}
TECH {stats.tech}
COOL {stats.cool}
WILL {stats.will}
LUCK {stats.luck}/{stats.luck}
MOVE {stats.move}
BODY {stats.body}
EMP {stats.emp}/{stats.emp}
); } const resources = [ { href: "https://reactrouter.com/docs", text: "React Router Docs", icon: ( ), }, { href: "https://rmx.as/discord", text: "Join Discord", icon: ( ), }, { href: "https://rmx.as/discord", text: "Join Discord", icon: ( ), }, ];