initial fudgin on wep and arms.
This commit is contained in:
1 parent
18298c35d4
commit
9b27c948ce
3 files changed
+88
No files matched your search
@@ -0,0 +1,50 @@
|
||||
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 wandr = await fetch(`${baseUrl}/characters/collateral/weaponsandarmor.json`)
|
||||
.then(r => {
|
||||
console.log(r)
|
||||
return r.json()
|
||||
});
|
||||
|
||||
|
||||
|
||||
function Armor({ armor }) {
|
||||
return (
|
||||
<table className="cyber-table">
|
||||
<tbody>
|
||||
<tr style={{lineHeight: 1}}>
|
||||
<td>Head Armor: {armor.displayheadarmor}</td>
|
||||
<td>SP: {armor.displayheadarmorsp}</td>
|
||||
<td>Penalty: {armor.dislpayheadarmorpenalty}</td>
|
||||
</tr>
|
||||
<tr style={{lineHeight: 1}}>
|
||||
<td>Body Armor: {armor.displaybodyarmor}</td>
|
||||
<td>SP: {armor.displaybodyarmorsp}</td>
|
||||
<td>Penalty: {armor.displaybodyarmorpenalty}</td>
|
||||
</tr>
|
||||
<tr style={{lineHeight: 1}}>
|
||||
<td>Shield:</td>
|
||||
<td>HP:</td>
|
||||
<td>Penalty:</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
)
|
||||
}
|
||||
|
||||
function Weapons({ weapons }) {
|
||||
|
||||
}
|
||||
|
||||
export function WeaponsAndArmor() {
|
||||
return (
|
||||
<div>
|
||||
<Armor armor={wandr}/>
|
||||
<Weapons weapons={wandr.displayweapons} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user