Fix change name

This commit is contained in:
Bill 2022-08-11 13:29:54 -04:00
parent 6dc2b678ca
commit 138b3d64e6
2 changed files with 16 additions and 19 deletions

View File

@ -71,8 +71,6 @@ export const HelpView: FC<{}> = props =>
setIsVisible(true); setIsVisible(true);
}, [ activeReport ]); }, [ activeReport ]);
if(!isVisible && !activeReport) return null;
const CurrentStepView = () => const CurrentStepView = () =>
{ {
if(activeReport) if(activeReport)
@ -97,19 +95,20 @@ export const HelpView: FC<{}> = props =>
return ( return (
<> <>
<NitroCardView className="nitro-help" theme="primary-slim"> { isVisible &&
<NitroCardHeaderView headerText={ LocalizeText('help.button.cfh') } onCloseClick={ onClose } /> <NitroCardView className="nitro-help" theme="primary-slim">
<NitroCardContentView className="text-black"> <NitroCardHeaderView headerText={ LocalizeText('help.button.cfh') } onCloseClick={ onClose } />
<Grid> <NitroCardContentView className="text-black">
<Column center size={ 5 } overflow="hidden"> <Grid>
<Base className="index-image" /> <Column center size={ 5 } overflow="hidden">
</Column> <Base className="index-image" />
<Column justifyContent="between" size={ 7 } overflow="hidden"> </Column>
<CurrentStepView /> <Column justifyContent="between" size={ 7 } overflow="hidden">
</Column> <CurrentStepView />
</Grid> </Column>
</NitroCardContentView> </Grid>
</NitroCardView> </NitroCardContentView>
</NitroCardView> }
<SanctionSatusView /> <SanctionSatusView />
<NameChangeView /> <NameChangeView />
</> </>

View File

@ -17,13 +17,11 @@ export const NameChangeView:FC<{}> = props =>
const [ layout, setLayout ] = useState<string>(INIT); const [ layout, setLayout ] = useState<string>(INIT);
const [ newUsername, setNewUsername ] = useState<string>(''); const [ newUsername, setNewUsername ] = useState<string>('');
const onHelpNameChangeEvent = useCallback((event: HelpNameChangeEvent) => useUiEvent<HelpNameChangeEvent>(HelpNameChangeEvent.INIT, event =>
{ {
setLayout(INIT); setLayout(INIT);
setIsVisible(true); setIsVisible(true);
}, []); });
useUiEvent(HelpNameChangeEvent.INIT, onHelpNameChangeEvent);
const onAction = useCallback((action: string, value?: string) => const onAction = useCallback((action: string, value?: string) =>
{ {