Skip to content

Commit

Permalink
fix(react-signin): design subnames
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony23991 committed Sep 20, 2024
1 parent b10b40c commit b384537
Showing 1 changed file with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export interface SelectSubnameDialogProps {
open: boolean;
}

export const SelectSubnameDialog: React.FC<SelectSubnameDialogProps> = ({ subnames, handleOpenDialog, open }) => {
const { address} = useMountedAccount();
export const SelectSubnameDialog: React.FC<SelectSubnameDialogProps> = ({ subnames, handleOpenDialog, open }) => {
const { address } = useMountedAccount();
const [username, setUsername] = React.useState('');
const [subnameSigningIn, setSubnameSigningIn] = React.useState('');
const { ensDomain } = useJustaName();
Expand Down Expand Up @@ -82,7 +82,7 @@ export const SelectSubnameDialog: React.FC<SelectSubnameDialogProps> = ({ subna
}}>
<Flex
style={{
padding:'0px 0 0 0',
padding: '0px 0 0 0',
borderRadius: '16px',
background: 'var(--justaname-foreground-color-4)',
}}
Expand Down Expand Up @@ -114,7 +114,7 @@ export const SelectSubnameDialog: React.FC<SelectSubnameDialogProps> = ({ subna
cursor: 'pointer'
}}
onClick={() => handleOpenDialog(false)}
/>
/>
</Flex>

<TransitionElement className={(shouldBeAbleToSelect) ? 'visible' : ''} maxheight={'fit-content'}>
Expand All @@ -129,6 +129,11 @@ export const SelectSubnameDialog: React.FC<SelectSubnameDialogProps> = ({ subna
<Flex
direction={'column'}
gap={'15px'}
style={{
maxHeight: '20vh',
overflowY: 'scroll',
overflowX: 'hidden'
}}
>
{
subnames.map((subname, index) => {
Expand All @@ -139,7 +144,7 @@ export const SelectSubnameDialog: React.FC<SelectSubnameDialogProps> = ({ subna
subname={subname}
onClick={() => {
setSubnameSigningIn(subname.subname);
signIn({ ens: subname.subname }).then(()=> handleOpenDialog(false)).finally(() => {
signIn({ ens: subname.subname }).then(() => handleOpenDialog(false)).finally(() => {
setSubnameSigningIn('');
});
}}
Expand Down Expand Up @@ -230,13 +235,13 @@ export const SelectSubnameDialog: React.FC<SelectSubnameDialogProps> = ({ subna
}}
>
Powered by <A
style={{
color: 'var(--justaname-primary-color)',
fontWeight: '700',
fontSize: '12px'
style={{
color: 'var(--justaname-primary-color)',
fontWeight: '700',
fontSize: '12px'

}}
href="https://justaname.id" target="_blank" rel="noreferrer">justaname.id</A>
}}
href="https://justaname.id" target="_blank" rel="noreferrer">justaname.id</A>
</SPAN>

</Flex>
Expand Down

0 comments on commit b384537

Please sign in to comment.