mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Make useProfile()
use of undefined
explicit
This commit is contained in:
parent
333b7cc041
commit
caa3a7e8d0
@ -38,7 +38,7 @@ type ProfileSaveCallback = ({
|
||||
removeAvatar: boolean;
|
||||
}) => Promise<void>;
|
||||
|
||||
export function useProfile(client?: MatrixClient) {
|
||||
export function useProfile(client: MatrixClient | undefined) {
|
||||
const [{ success, loading, displayName, avatarUrl, error }, setState] =
|
||||
useState<ProfileLoadState>(() => {
|
||||
let user: User | undefined = undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user