-

-
+
+
diff --git a/app/routes/home.tsx b/app/routes/home.tsx
index 35a4b80..510484c 100644
--- a/app/routes/home.tsx
+++ b/app/routes/home.tsx
@@ -5,7 +5,7 @@ import { Control } from "../skills/control";
import { EducationTop, EducationBottom } from "../skills/education"
import { Fighting } from "../skills/fighting"
import { Performance } from "../skills/performance"
-import { Ranged } from "../skills/ranged"
+import { RangedTop, RangedBottom } from "../skills/ranged"
import { Social } from "../skills/social"
import { Technique } from "../skills/technique"
import { Details } from "../details/details"
@@ -28,21 +28,19 @@ export default function Home() {
-
@@ -57,9 +55,10 @@ export default function Home() {
-
+
+
diff --git a/app/skills/awareness.tsx b/app/skills/awareness.tsx
index e589635..f020b5c 100644
--- a/app/skills/awareness.tsx
+++ b/app/skills/awareness.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
@@ -19,45 +20,13 @@ export function Awareness() {
return (
-
-
- | AWARENESS SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | CONCENTRATION |
- {skills.concentration} |
- {stats.will} |
- {stats.will + skills.concentration} |
-
-
- | CONCEAL / REVEAL OBJECT |
- {skills.cro} |
- {stats.int} |
- {stats.int + skills.cro} |
-
-
- | LIP READING |
- {skills.lipreading} |
- {stats.int} |
- {stats.int + skills.lipreading} |
-
-
- | PERCEPTION |
- {skills.perception} |
- {stats.int} |
- {stats.int + skills.perception} |
-
-
- | TRACKING |
- {skills.tracking} |
- {stats.int} |
- {stats.int + skills.tracking} |
-
+
+
+
+
+
diff --git a/app/skills/body.tsx b/app/skills/body.tsx
index 2743e96..e91d7b7 100644
--- a/app/skills/body.tsx
+++ b/app/skills/body.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
@@ -19,51 +20,14 @@ export function Body() {
return (
-
-
- | BODY SKILL |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | ATHLETICS |
- {skills.athletics} |
- {stats.dex} |
- {stats.dex + skills.athletics} |
-
-
- | CONTORTION |
- {skills.contortion} |
- {stats.dex} |
- {stats.dex + skills.contortion} |
-
-
- | DANCE |
- {skills.dance} |
- {stats.dex} |
- {stats.dex + skills.dance} |
-
-
- | ENDURANCE |
- {skills.endurance} |
- {stats.will} |
- {stats.will + skills.endurance} |
-
-
- | RESIST TORTURE / DRUGS |
- {skills.rtd} |
- {stats.will} |
- {stats.will + skills.rtd} |
-
-
- | STEALTH |
- {skills.stealth} |
- {stats.dex} |
- {stats.dex + skills.stealth} |
-
+
+
+
+
+
+
diff --git a/app/skills/control.tsx b/app/skills/control.tsx
index aeb76b9..f598eda 100644
--- a/app/skills/control.tsx
+++ b/app/skills/control.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
@@ -19,39 +20,12 @@ export function Control() {
return (
-
-
- | CONTROL SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | DRIVE LAND VEHICLE |
- {skills.driveland} |
- {stats.dex} |
- {stats.dex + skills.driveland} |
-
-
- | PILOT AIR VEHICLE |
- {skills.pilotair} |
- {stats.dex} |
- {stats.dex + skills.pilotair} |
-
-
- | PILOT SEA VEHICLE |
- {skills.lipreading} |
- {stats.dex} |
- {stats.dex + skills.pilotsea} |
-
-
- | RIDING |
- {skills.riding} |
- {stats.dex} |
- {stats.dex + skills.riding} |
-
+
+
+
+
diff --git a/app/skills/education.tsx b/app/skills/education.tsx
index f33bec3..1c285a6 100644
--- a/app/skills/education.tsx
+++ b/app/skills/education.tsx
@@ -1,10 +1,10 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
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());
@@ -12,25 +12,6 @@ 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 (<>
@@ -54,7 +35,7 @@ function EducationBottomSkills({ stats, skills }) {
-
+
@@ -72,14 +53,7 @@ export function EducationTop() {
return (
-
-
- | EDUCATION SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
@@ -95,14 +69,7 @@ export function EducationBottom() {
return (
-
-
- | EDUCATION SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
@@ -119,14 +86,7 @@ export function Education() {
return (
-
-
- | EDUCATION SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
diff --git a/app/skills/fighting.tsx b/app/skills/fighting.tsx
index 09ec477..72483b1 100644
--- a/app/skills/fighting.tsx
+++ b/app/skills/fighting.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
@@ -19,39 +20,12 @@ export function Fighting() {
return (
-
-
- | FIGHTING SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | BRAWLING |
- {skills.brawling} |
- {stats.dex} |
- {stats.dex + skills.brawling} |
-
-
- | EVASION |
- {skills.evasion} |
- {stats.dex} |
- {stats.dex + skills.evasion} |
-
-
- | MARTIAL ARTS |
- 0 |
- 4 |
- 4 |
-
-
- | MELEE WEAPONS |
- {skills.meleeweapons} |
- {stats.dex} |
- {stats.dex + skills.meleeweapons} |
-
+
+
+
+
diff --git a/app/skills/performance.tsx b/app/skills/performance.tsx
index 6d9cf93..7bec2f5 100644
--- a/app/skills/performance.tsx
+++ b/app/skills/performance.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
@@ -19,39 +20,12 @@ export function Performance() {
return (
-
-
- | PERFORMANCE SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | ACTING |
- {skills.acting} |
- {stats.cool} |
- {stats.cool + skills.acting} |
-
-
- | PLAY INSTRUMENT |
- --- |
- --- |
- --- |
-
-
- | --- |
- --- |
- --- |
- --- |
-
-
- | --- |
- --- |
- --- |
- --- |
-
+
+
+
+
diff --git a/app/skills/ranged.tsx b/app/skills/ranged.tsx
index dd2df6b..87c2da7 100644
--- a/app/skills/ranged.tsx
+++ b/app/skills/ranged.tsx
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
-
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
: process.env.VITE_VERCEL_URL || 'http://localhost:5173' // Fallback for your server env
@@ -11,6 +11,55 @@ const sk = await
fetch(`${baseUrl}/characters/collateral/skills.json`)
.then(r => r.json());
+function RangedTopSkills({ stats, skills }) {
+return (
+ <>
+
+
+
+ >)
+}
+
+function RangedBottomSkills({ stats, skills }) {
+ return (
+ <>
+
+
+ >)
+}
+
+export function RangedTop() {
+ const [stats] = useState(st)
+ const [skills] = useState(sk)
+
+ return (
+
+
+
+ )
+}
+
+export function RangedBottom() {
+ const [stats] = useState(st)
+ const [skills] = useState(sk)
+
+ return (
+
+
+
+ )
+}
+
export function Ranged() {
const [stats, setStats] = useState(st)
@@ -19,45 +68,10 @@ export function Ranged() {
return (
-
-
- | RANGE SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | ARCHERY |
- {skills.archery} |
- {stats.ref} |
- {stats.ref + skills.archery} |
-
-
- | AUTOFIRE |
- {skills.autofire} |
- {stats.ref} |
- {stats.ref + skills.autofire} |
-
-
- | HANDGUN |
- {skills.handgun} |
- {stats.ref} |
- {stats.ref + skills.handgun} |
-
-
- | HEAVY WEAPONS |
- {skills.heavyweapons} |
- {stats.dex} |
- {stats.dex + skills.meleeweapons} |
-
-
- | SHOULDER ARMS |
- {skills.heavyweapons} |
- {stats.ref} |
- {stats.ref + skills.meleeweapons} |
-
+
+
diff --git a/app/skills/skill.tsx b/app/skills/skill.tsx
new file mode 100644
index 0000000..ae021d1
--- /dev/null
+++ b/app/skills/skill.tsx
@@ -0,0 +1,31 @@
+function BaseVal({ skillRank, stat }) {
+ if (skillRank === "---") {
+ return --- |
+ } else {
+ return ({skillRank + stat} | )
+ }
+}
+
+export function SkillRow({ skillName, skillRank, stat }) {
+ return (
+
+ | {skillName} |
+ {skillRank} |
+ {stat} |
+
+
+ );
+}
+
+export function SkillHeader({skillGroup}) {
+ return (
+
+
+ | {skillGroup} |
+ RANKS |
+ STAT |
+ BASE |
+
+
+ )
+}
diff --git a/app/skills/social.tsx b/app/skills/social.tsx
index 92043ac..4577b2b 100644
--- a/app/skills/social.tsx
+++ b/app/skills/social.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
@@ -19,69 +20,17 @@ export function Social() {
return (
-
-
- | SOCIAL SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | BRIBERY |
- {skills.bribery} |
- {stats.cool} |
- {stats.cool + skills.bribery} |
-
-
- | CONVERSATION |
- {skills.conversation} |
- {stats.emp} |
- {stats.emp + skills.conversation} |
-
-
- | HUMAN PERCEPTION |
- {skills.humper} |
- {stats.emp} |
- {stats.emp + skills.humper} |
-
-
- | INTERROGATION |
- {skills.interogation} |
- {stats.cool} |
- {stats.cool + skills.interogation} |
-
-
- | PERSUASION |
- {skills.persuasion} |
- {stats.cool} |
- {stats.cool + skills.persuasion} |
-
-
- | PERSONAL GROOMING |
- {skills.heavyweapons} |
- {stats.cool} |
- {stats.cool + skills.heavyweapons} |
-
-
- | STREETWISE |
- {skills.streetwise} |
- {stats.cool} |
- {stats.cool + skills.streetwise} |
-
-
- | TRADING |
- {skills.trading} |
- {stats.cool} |
- {stats.cool + skills.trading} |
-
-
- | WARDROBE AND STYLE |
- {skills.wardrobe} |
- {stats.cool} |
- {stats.cool + skills.wardrobe} |
-
+
+
+
+
+
+
+
+
+
diff --git a/app/skills/technique.tsx b/app/skills/technique.tsx
index 33febd9..824a0dc 100644
--- a/app/skills/technique.tsx
+++ b/app/skills/technique.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react'
+import { SkillHeader, SkillRow } from './skill'
const baseUrl = typeof window !== 'undefined'
? window.location.origin
@@ -19,105 +20,23 @@ export function Technique() {
return (
-
-
- | TECHNIQUE SKILLS |
- RANKS |
- STAT |
- BASE |
-
-
+
-
- | AIR VEHICLE TECH |
- {skills.avt} |
- {stats.tech} |
- {stats.tech + skills.avt} |
-
-
- | BASIC TECH |
- {skills.basic} |
- {stats.tech} |
- {stats.tech + skills.basic} |
-
-
- | CYBER TECH |
- {skills.cyber} |
- {stats.tech} |
- {stats.tech + skills.cyber} |
-
-
- | DEMOLITIONS |
- {skills.demo} |
- {stats.tech} |
- {stats.tech + skills.demo} |
-
-
- | ELEC / SEC TECH |
- {skills.elecsec} |
- {stats.tech} |
- {stats.tech + skills.elecsec} |
-
-
- | FIRST AID |
- {skills.firstaid} |
- {stats.tech} |
- {stats.tech + skills.firstaid} |
-
-
- | FORGERY |
- {skills.forgery} |
- {stats.tech} |
- {stats.tech + skills.forgery} |
-
-
- | LAND VEHICLE TECH |
- {skills.lvt} |
- {stats.tech} |
- {stats.tech + skills.lvt} |
-
-
- | PAINT / DRAW / SCULPT |
- {skills.pds} |
- {stats.tech} |
- {stats.tech + skills.pds} |
-
-
- | PARAMEDIC |
- {skills.paramedic} |
- {stats.tech} |
- {stats.tech + skills.paramedic} |
-
-
- | PHOTOGRAPHY / FILM |
- {skills.photofilm} |
- {stats.tech} |
- {stats.tech + skills.photofilm} |
-
-
- | PICK LOCK |
- {skills.picklock} |
- {stats.tech} |
- {stats.tech + skills.picklock} |
-
-
- | PICK POCKET |
- {skills.pickpocket} |
- {stats.tech} |
- {stats.tech + skills.pickpocket} |
-
-
- | SEA VEHICLE TECH |
- {skills.svt} |
- {stats.tech} |
- {stats.tech + skills.svt} |
-
-
- | WEAPONS TECH |
- {skills.weapons} |
- {stats.tech} |
- {stats.tech + skills.weapons} |
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+