Uint8Array migration

This commit is contained in:
Fedor Indutny 2021-09-23 17:49:05 -07:00 committed by GitHub
parent daf75190b8
commit 4ef0bf96cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
137 changed files with 2202 additions and 3170 deletions

View file

@ -37,7 +37,7 @@ type PropsExternalType = {
onEditStateChanged: (editState: EditState) => unknown;
onProfileChanged: (
profileData: ProfileDataType,
avatarBuffer?: ArrayBuffer
avatarBuffer?: Uint8Array
) => unknown;
};
@ -126,7 +126,7 @@ export const ProfileEditor = ({
aboutText,
});
const [avatarBuffer, setAvatarBuffer] = useState<ArrayBuffer | undefined>(
const [avatarBuffer, setAvatarBuffer] = useState<Uint8Array | undefined>(
undefined
);
const [stagedProfile, setStagedProfile] = useState<ProfileDataType>({
@ -153,7 +153,7 @@ export const ProfileEditor = ({
);
const handleAvatarChanged = useCallback(
(avatar: ArrayBuffer | undefined) => {
(avatar: Uint8Array | undefined) => {
setAvatarBuffer(avatar);
setEditState(EditState.None);
onProfileChanged(stagedProfile, avatar);