Make useProfile() use of undefined explicit
This commit is contained in:
@@ -38,7 +38,7 @@ type ProfileSaveCallback = ({
|
|||||||
removeAvatar: boolean;
|
removeAvatar: boolean;
|
||||||
}) => Promise<void>;
|
}) => Promise<void>;
|
||||||
|
|
||||||
export function useProfile(client?: MatrixClient) {
|
export function useProfile(client: MatrixClient | undefined) {
|
||||||
const [{ success, loading, displayName, avatarUrl, error }, setState] =
|
const [{ success, loading, displayName, avatarUrl, error }, setState] =
|
||||||
useState<ProfileLoadState>(() => {
|
useState<ProfileLoadState>(() => {
|
||||||
let user: User | undefined = undefined;
|
let user: User | undefined = undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user