Add keyboard activation to the interactive elements and use stable keys. [skip build]
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { ChangeEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import React, { ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { Box, Text, Input, Avatar, Button, config, Spinner, color, toRem } from 'folds';
|
||||
import { HexColorPicker } from 'react-colorful';
|
||||
@@ -38,13 +38,7 @@ import {
|
||||
/**
|
||||
* Banner upload component for user's profile banner (MSC4427 via MSC4133).
|
||||
*/
|
||||
function ProfileBanner({
|
||||
avatarRef,
|
||||
nameRef,
|
||||
}: {
|
||||
avatarRef: React.RefObject<HTMLDivElement>;
|
||||
nameRef: React.RefObject<HTMLDivElement>;
|
||||
}) {
|
||||
function ProfileBanner() {
|
||||
const mx = useMatrixClient();
|
||||
const useAuthentication = useMediaAuthentication();
|
||||
const userId = mx.getUserId()!;
|
||||
@@ -1207,8 +1201,5 @@ function ProfileBanner({
|
||||
}
|
||||
|
||||
export function Profile() {
|
||||
const avatarRef = useRef<HTMLDivElement>(null);
|
||||
const nameRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
return <ProfileBanner avatarRef={avatarRef} nameRef={nameRef} />;
|
||||
return <ProfileBanner />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user