Hide avatar input for unregistered users
This commit is contained in:
parent
d493b95782
commit
6ea821a36e
3 changed files with 35 additions and 8 deletions
|
|
@ -4,7 +4,13 @@ import { useProfile } from "./ConferenceCallManagerHooks";
|
|||
import { FieldRow, InputField, ErrorMessage } from "./Input";
|
||||
import { Modal, ModalContent } from "./Modal";
|
||||
|
||||
export function ProfileModal({ client, ...rest }) {
|
||||
export function ProfileModal({
|
||||
client,
|
||||
isAuthenticated,
|
||||
isPasswordlessUser,
|
||||
isGuest,
|
||||
...rest
|
||||
}) {
|
||||
const { onClose } = rest;
|
||||
const {
|
||||
success,
|
||||
|
|
@ -60,9 +66,16 @@ export function ProfileModal({ client, ...rest }) {
|
|||
onChange={onChangeDisplayName}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField type="file" id="avatar" name="avatar" label="Avatar" />
|
||||
</FieldRow>
|
||||
{isAuthenticated && !isGuest && !isPasswordlessUser && (
|
||||
<FieldRow>
|
||||
<InputField
|
||||
type="file"
|
||||
id="avatar"
|
||||
name="avatar"
|
||||
label="Avatar"
|
||||
/>
|
||||
</FieldRow>
|
||||
)}
|
||||
{error && (
|
||||
<FieldRow>
|
||||
<ErrorMessage>{error.message}</ErrorMessage>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue