97 | { identity.skills.map((skill, index) =>
98 | index < 3 && sinHexCombo(skill, index)
99 | )}
100 |
101 | )
102 | }
103 |
104 | function sinHexCombo(skill: Skill, index: number) {
105 | return (
106 |
134 | { [active, passive].map((item, index) =>
135 |
139 |
})
140 | {`${item.activation.substring(0, 3)}\n x${item.cost}`}
141 |
142 | )}
143 |
144 | )
145 | }
146 |
--------------------------------------------------------------------------------
/hooks/teamContext.tsx:
--------------------------------------------------------------------------------
1 | import { useContext, createContext, useReducer } from 'react';
2 | import initialIdData from './initialTeam.json';
3 | import { TeamMember, IdentityData, EgoData, Sin, SINNER_NUMBERS, SinnerNumber } from '@/types/data';
4 |
5 | type TeamEditAction =
6 | | {type: "set-active", sinner: SinnerNumber, active: boolean}
7 | | {type: "update-id", identity: IdentityData}
8 | | {type: "update-ego", ego: EgoData}
9 | | {type: "set-egos", egos: EgoData[]}
10 |
11 | const TeamContext = createContext