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()); function BaseVal({ skillRank, stat }) { if (skillRank === "---") { return --- } else { return ({skillRank + stat}) } } function SkillRow({ skillName, skillRank, stat }) { return ( {skillName} {skillRank} {stat} ); } function EducationTopSkills({ stats, skills }) { return (<> ) } function EducationBottomSkills({ stats, skills }) { return (<> ) } export function EducationTop() { const [stats] = useState(st) const [skills] = useState(sk) return (
EDUCATION SKILLS RANKS STAT BASE
) } export function EducationBottom() { const [stats] = useState(st) const [skills] = useState(sk) return (
EDUCATION SKILLS RANKS STAT BASE
) } export function Education() { const [stats] = useState(st) const [skills] = useState(sk) return (
EDUCATION SKILLS RANKS STAT BASE
) }