Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 lines
1007 B
TypeScript
46 lines
1007 B
TypeScript
import { USAState } from './usa-state'
|
|
import { probToColor } from './state-election-map'
|
|
import { StateProps } from './presidential-state'
|
|
|
|
export function GovernorState(props: StateProps) {
|
|
const {
|
|
stateKey,
|
|
data,
|
|
stateContract,
|
|
handleClick,
|
|
onMouseEnter,
|
|
onMouseLeave,
|
|
targetState,
|
|
hoveredState,
|
|
} = props
|
|
if (!!stateContract) {
|
|
return (
|
|
<USAState
|
|
key={stateKey}
|
|
stateData={data}
|
|
state={stateKey}
|
|
fill={probToColor(stateContract)}
|
|
onClickState={() => {
|
|
handleClick(stateKey)
|
|
}}
|
|
onMouseEnterState={() => {
|
|
onMouseEnter(stateKey)
|
|
}}
|
|
onMouseLeaveState={() => {
|
|
onMouseLeave()
|
|
}}
|
|
selected={!!targetState && targetState == stateKey}
|
|
hovered={!!hoveredState && hoveredState == stateKey}
|
|
/>
|
|
)
|
|
}
|
|
return (
|
|
<USAState
|
|
key={stateKey}
|
|
stateData={data}
|
|
state={stateKey}
|
|
fill={'#76769366'}
|
|
/>
|
|
)
|
|
}
|