-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mobile/1649 - feat:use context menu for information about unregistere…
…d username instead screen (#1985) * feat:use context menu for information about unregistered username instead screen * fix:child component and spacing * fix:add top border * fix: appearance --------- Co-authored-by: siepra <[email protected]>
- Loading branch information
Showing
14 changed files
with
90 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...ges/mobile/src/components/ContextMenu/menus/UnregisteredUsernameContextMenu.container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React, { FC } from 'react' | ||
import { useContextMenu } from '../../../hooks/useContextMenu' | ||
import { MenuName } from '../../../const/MenuNames.enum' | ||
import { ContextMenu } from '../ContextMenu.component' | ||
import { UnregisteredUsernameArgs } from '../ContextMenu.types' | ||
import { View } from 'react-native' | ||
import { Typography } from '../../Typography/Typography.component' | ||
import { Button } from '../../Button/Button.component' | ||
import { defaultPalette } from '../../../styles/palettes/default.palette' | ||
|
||
export const UnregisteredUsernameContextMenu: FC = () => { | ||
const title = 'Unregistered username' | ||
const usernameTakenContextMenu = useContextMenu<UnregisteredUsernameArgs>(MenuName.UnregisteredUsername) | ||
|
||
return ( | ||
<ContextMenu title={title} items={[]} {...usernameTakenContextMenu}> | ||
<View | ||
style={{ padding: 20, alignItems: 'center', borderTopWidth: 1, borderColor: defaultPalette.background.gray06 }} | ||
> | ||
<View> | ||
<Typography fontSize={14} style={{ textAlign: 'center', lineHeight: 20 }}> | ||
The username{' '} | ||
<Typography fontSize={14} fontWeight={'bold'}> | ||
@{usernameTakenContextMenu.username} | ||
</Typography>{' '} | ||
has not been registered yet with the community owner, so it’s still possible for someone else to register | ||
the same username. | ||
</Typography> | ||
</View> | ||
|
||
<View style={{ marginTop: 20 }}> | ||
<Typography fontSize={14} style={{ textAlign: 'center', lineHeight: 20 }}> | ||
When the community owner is online,{' '} | ||
<Typography fontSize={14} fontWeight={'bold'}> | ||
@{usernameTakenContextMenu.username} | ||
</Typography>{' '} | ||
will be registered automatically and this alert will go away. | ||
</Typography> | ||
</View> | ||
|
||
<View style={{ marginTop: 20 }}> | ||
<Button width={160} title={'OK'} onPress={usernameTakenContextMenu.handleClose} /> | ||
</View> | ||
</View> | ||
</ContextMenu> | ||
) | ||
} |
31 changes: 0 additions & 31 deletions
31
packages/mobile/src/components/UserLabel/Unregistered/UnregisteredUsername.component.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.