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,6 +95,7 @@ export const HelpView: FC<{}> = props =>
return ( return (
<> <>
{ isVisible &&
<NitroCardView className="nitro-help" theme="primary-slim"> <NitroCardView className="nitro-help" theme="primary-slim">
<NitroCardHeaderView headerText={ LocalizeText('help.button.cfh') } onCloseClick={ onClose } /> <NitroCardHeaderView headerText={ LocalizeText('help.button.cfh') } onCloseClick={ onClose } />
<NitroCardContentView className="text-black"> <NitroCardContentView className="text-black">
@ -109,7 +108,7 @@ export const HelpView: FC<{}> = props =>
</Column> </Column>
</Grid> </Grid>
</NitroCardContentView> </NitroCardContentView>
</NitroCardView> </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) =>
{ {