diff --git a/src/app/components/ResponsiveLayer/index.tsx b/src/app/components/ResponsiveLayer/index.tsx index 3dad3203f1..edb3a69c1b 100644 --- a/src/app/components/ResponsiveLayer/index.tsx +++ b/src/app/components/ResponsiveLayer/index.tsx @@ -38,7 +38,7 @@ export function ResponsiveLayer(props: LayerExtendedProps) { - - - onSubmit={({ value }) => { - if (!editAccount) { - return + + onSubmit={({ value }) => { + if (!editAccount) { + return + } + editAccount(value.name) + closeHandler() + }} + value={value} + onChange={nextValue => setValue(nextValue)} + > + + + { + closeParentHandler ? closeParentHandler() : closeHandler() + navigate('/open-wallet') + }} + /> + ), + }} + defaults="To name your account create a profile while opening a wallet." + /> + + ) : undefined } - editAccount(value.name) - closeHandler() - }} - value={value} - onChange={nextValue => setValue(nextValue)} - > - - + name.trim().length > 16 + ? { + message: t('toolbar.settings.nameLengthError', 'No more than 16 characters'), + status: 'error', + } + : undefined + } + > + - { - closeParentHandler ? closeParentHandler() : closeHandler() - navigate('/open-wallet') - }} - /> - ), - }} - defaults="To name your account create a profile while opening a wallet." - /> - - ) : undefined - } name="name" - validate={(name: string) => - name.trim().length > 16 - ? { - message: t('toolbar.settings.nameLengthError', 'No more than 16 characters'), - status: 'error', - } - : undefined - } - > - - - - - - - - - + placeholder={t('toolbar.settings.optionalName', 'Name (optional)')} + /> + + + + + + + + +
+ +
- -
- + +
`; diff --git a/src/app/components/Toolbar/Features/Contacts/index.tsx b/src/app/components/Toolbar/Features/Contacts/index.tsx index 58b295d810..80694d2fbf 100644 --- a/src/app/components/Toolbar/Features/Contacts/index.tsx +++ b/src/app/components/Toolbar/Features/Contacts/index.tsx @@ -1,26 +1,26 @@ -import { useState, useContext, ReactNode } from 'react' +import { useState, ReactNode } from 'react' import { useSelector } from 'react-redux' import { Trans, useTranslation } from 'react-i18next' import { useNavigate } from 'react-router-dom' import { Box } from 'grommet/es6/components/Box' import { Button } from 'grommet/es6/components/Button' -import { ResponsiveContext } from 'grommet/es6/contexts/ResponsiveContext' import { Inbox } from 'grommet-icons/es6/icons/Inbox' import { selectContactsList } from 'app/state/contacts/selectors' import { selectUnlockedStatus } from 'app/state/selectUnlockedStatus' import { ContactAccount } from './ContactAccount' import { AddContact } from './AddContact' import { ScrollableContainer } from '../ScrollableContainer' -import { layerScrollableAreaHeight } from '../layer' type ContactsListEmptyStateProps = { children: ReactNode } const ContactsListEmptyState = ({ children }: ContactsListEmptyStateProps) => ( - + - {children} + + {children} + ) @@ -33,7 +33,6 @@ export const Contacts = ({ closeHandler }: ContactsProps) => { const [layerVisibility, setLayerVisibility] = useState(false) const contacts = useSelector(selectContactsList) const unlockedStatus = useSelector(selectUnlockedStatus) - const isMobile = useContext(ResponsiveContext) === 'small' const isAvailable = unlockedStatus === 'unlockedProfile' const navigate = useNavigate() @@ -63,13 +62,11 @@ export const Contacts = ({ closeHandler }: ContactsProps) => { } return ( - <> + {!contacts.length && ( - - - {t('toolbar.contacts.emptyList', 'You have no contacts yet.')} - - + + {t('toolbar.contacts.emptyList', 'You have no contacts yet.')} + )} {!!contacts.length && ( @@ -86,6 +83,6 @@ export const Contacts = ({ closeHandler }: ContactsProps) => { /> {layerVisibility && } - + ) } diff --git a/src/app/components/Toolbar/Features/LayerContainer/index.tsx b/src/app/components/Toolbar/Features/LayerContainer/index.tsx index 01cf984a4b..d844b82c87 100644 --- a/src/app/components/Toolbar/Features/LayerContainer/index.tsx +++ b/src/app/components/Toolbar/Features/LayerContainer/index.tsx @@ -29,7 +29,7 @@ export const LayerContainer = ({ animation, children, hideLayer }: LayerContaine minHeight: `min(${layerOverlayMinHeight}, 90dvh)`, }} > - +