mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Fix hook count error
This commit is contained in:
parent
25657a548f
commit
aa1b4819bb
@ -39,14 +39,6 @@ export const UserDropdown: FC<UserDropdownProps> = ({ username: defaultUsername
|
||||
const [chatToggleVisible, setChatToggleVisible] = useRecoilState(chatVisibleToggleAtom);
|
||||
const appState = useRecoilValue<AppStateOptions>(appStateAtom);
|
||||
|
||||
const currentUser = useRecoilValue(currentUserAtom);
|
||||
if (!currentUser) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { displayName } = currentUser;
|
||||
const username = defaultUsername || displayName;
|
||||
|
||||
const toggleChatVisibility = () => {
|
||||
setChatToggleVisible(!chatToggleVisible);
|
||||
};
|
||||
@ -65,6 +57,13 @@ export const UserDropdown: FC<UserDropdownProps> = ({ username: defaultUsername
|
||||
[chatToggleVisible],
|
||||
);
|
||||
|
||||
const currentUser = useRecoilValue(currentUserAtom);
|
||||
if (!currentUser) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { displayName } = currentUser;
|
||||
const username = defaultUsername || displayName;
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu.Item key="0" icon={<EditOutlined />} onClick={() => handleChangeName()}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user