css stuff. rows and cols for main.
This commit is contained in:
1 parent
2a61649fcb
commit
4e30b49c6c
5 files changed
+132
-18
No files matched your search
@@ -0,0 +1,53 @@
|
||||
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 Fighting() {
|
||||
|
||||
const [stats, setStats] = useState(st)
|
||||
const [skills, setSkills] = useState(sk)
|
||||
|
||||
return (
|
||||
<main>
|
||||
<table className="cyber-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{ width: "70%" }}>FIGHTING SKILLS</th>
|
||||
<th style={{ width: "10%" }}>RANKS</th>
|
||||
<th style={{ width: "10%" }}>STAT</th>
|
||||
<th style={{ width: "10%" }}>BASE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>BRAWLING</td>
|
||||
<td>{skills.brawling}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.brawling}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EVASION</td>
|
||||
<td>{skills.evasion}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.evasion}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MELEE WEAPONS</td>
|
||||
<td>{skills.meleeweapons}</td>
|
||||
<td>{stats.dex}</td>
|
||||
<td>{stats.dex + skills.meleeweapons}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user