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

View File

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