import * as React from 'react' import PJCreationMenu from '@lastres/components/pj-creation-menu' import PJListSelection from '@lastres/components/pj-list-selection' import { PJ, fetchMyPjs } from '@lastres/pj' export interface PJSelectionMenuProps { setSelectedPJ: (set: PJ | null) => void setUserWantsToCreatePJ: (set: boolean) => void userWantsToCreatePJ: boolean error: string | null setError: (set: string | null) => void } export default function PJSelectionMenu (props: PJSelectionMenuProps): JSX.Element { const [pjs, setPJs] = React.useState(null) const createPJ = (): void => { props.setUserWantsToCreatePJ(true) } if (props.userWantsToCreatePJ) { return ( ) } if (pjs === null) { fetchMyPjs(props.setError) .then((pjs)=> { setPJs(pjs) }) } return (

L3TDE

Selecciona un Personaje

Crear un nuevo personaje
) }