chore: linting

This commit is contained in:
Juan Di Toro 2023-10-07 18:14:21 +02:00
parent 4d0f13a197
commit 4e4ced81ba
2 changed files with 7 additions and 12 deletions

View File

@ -3,7 +3,7 @@ import React from 'react';
import LumeLogoBg from '../../../assets/lume-logo-bg.svg?react'; import LumeLogoBg from '../../../assets/lume-logo-bg.svg?react';
import { Button } from '../../../components/ui/button'; import { Button } from '../../../components/ui/button';
import { SwitchableComponent, SwitchableComponentProvider, useSwitchableComponent } from '../../../components/SwitchableComponent'; import { SwitchableComponent, SwitchableComponentProvider, useSwitchableComponent } from '../../../components/SwitchableComponent';
import ComponentList from "./components"; import * as ComponentList from "./components";
import { LumeIdentityContext, Session } from './LumeIdentityContext'; import { LumeIdentityContext, Session } from './LumeIdentityContext';
import { LazyMotion, domAnimation } from 'framer-motion'; import { LazyMotion, domAnimation } from 'framer-motion';
import * as Dialog from '@radix-ui/react-dialog'; import * as Dialog from '@radix-ui/react-dialog';

View File

@ -10,7 +10,7 @@ import { useLumeIndentity } from "./LumeIdentityContext";
const SubmitButtonComponent = () => { const SubmitButtonComponent = () => {
const { setVisibleComponent } = useSwitchableComponent(); const { setVisibleComponent } = useSwitchableComponent();
return ( return (
<Button className='w-full h-12' variant={"outline"} onClick={() => setVisibleComponent(components.SeedPhraseInput)}> <Button className='w-full h-12' variant={"outline"} onClick={() => setVisibleComponent(SeedPhraseInput)}>
<span className="text-center text-lg font-normal leading-normal">Sign in with Account Key</span> <span className="text-center text-lg font-normal leading-normal">Sign in with Account Key</span>
</Button> </Button>
) )
@ -59,7 +59,7 @@ const SetupAccountKeyComponent = () => {
style={{ maxWidth: width ?? 'auto' }} style={{ maxWidth: width ?? 'auto' }}
ref={(t) => setTimeout(() => setWidth(t!.getBoundingClientRect().width!), 0)} ref={(t) => setTimeout(() => setWidth(t!.getBoundingClientRect().width!), 0)}
> >
<Button className='w-full h-full' onClick={() => setVisibleComponent(components.SeedPhraseGeneration)}> <Button className='w-full h-full' onClick={() => setVisibleComponent(SeedPhraseGeneration)}>
<span className="text-center text-lg font-normal leading-normal">I get it, I'll keep it safe. Let's see the key.</span> <span className="text-center text-lg font-normal leading-normal">I get it, I'll keep it safe. Let's see the key.</span>
</Button> </Button>
</m.div> </m.div>
@ -139,12 +139,7 @@ const SeedPhraseGenerationComponent = ({ phraseLength = 12 }) => {
) )
}; };
// Usage export const SubmitButton = makeSwitchable(SubmitButtonComponent, 'submit-button');
const components = { export const SeedPhraseInput = makeSwitchable(SeedPhraseInputComponent, 'seed-phrase-input');
SubmitButton: makeSwitchable(SubmitButtonComponent, 'submit-button'), export const SetupAccountKey = makeSwitchable(SetupAccountKeyComponent, 'setup-account-key');
SeedPhraseInput: makeSwitchable(SeedPhraseInputComponent, 'seed-phrase-input'), export const SeedPhraseGeneration = makeSwitchable(SeedPhraseGenerationComponent, 'seed-phrase-form');
SetupAccountKey: makeSwitchable(SetupAccountKeyComponent, 'setup-account-key'),
SeedPhraseGeneration: makeSwitchable(SeedPhraseGenerationComponent, 'seed-phrase-form'),
};
export default components;