Skip to content

Commit

Permalink
renamed modal components
Browse files Browse the repository at this point in the history
  • Loading branch information
Im Khem authored and Im Khem committed Jul 26, 2023
1 parent b9d9e33 commit 8532407
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
9 changes: 3 additions & 6 deletions src/refactor/masanew.stories.tsx
Expand Up @@ -20,10 +20,7 @@ import MasaProvider from './masa-provider';
import { useSession } from './masa/use-session';
import { MasaQueryClientContext } from './masa-client/masa-query-client-context';

import {
InterfaceAuthenticate,
InterfaceCreateIdentity,
} from './ui/components/modals';
import { AuthenticateModal, CreateIdentityModal } from './ui/components/modals';

// * nextjs fix
// * TODO: move this to index.ts file at some point
Expand Down Expand Up @@ -475,7 +472,7 @@ const ModalFlow = () => {
<Button
type="button"
disabled={!!hasSession}
onClick={() => NiceModal.show(InterfaceAuthenticate)}
onClick={() => NiceModal.show(AuthenticateModal)}
>
{isDisconnected ? 'Connect' : 'Authenticate'}
</Button>
Expand All @@ -488,7 +485,7 @@ const ModalFlow = () => {
<li>
<Button
type="button"
onClick={() => NiceModal.show(InterfaceCreateIdentity)}
onClick={() => NiceModal.show(CreateIdentityModal)}
>
Create Identity
</Button>
Expand Down
Expand Up @@ -7,7 +7,7 @@ import { useConfig } from '../../../../base-provider';
import NiceModal, { useModal } from '@ebay/nice-modal-react';
import { Modal } from '../modal';

export const InterfaceAuthenticate = NiceModal.create((): JSX.Element => {
export const AuthenticateModal = NiceModal.create((): JSX.Element => {
const modal = useModal();

const {
Expand Down
2 changes: 1 addition & 1 deletion src/refactor/ui/components/modals/authenticate/index.tsx
@@ -1 +1 @@
export { InterfaceAuthenticate } from './authenticate';
export { AuthenticateModal } from './authenticate';
Expand Up @@ -8,12 +8,12 @@ import { useIdentityPurchase } from '../../../../masa/use-identity-purchase';
import NiceModal, { useModal } from '@ebay/nice-modal-react';
import { Modal } from '../modal';

interface InterfaceCreateIdentityProps {
interface CreateIdentityModalProps {
handleComplete: () => void;
}

export const InterfaceCreateIdentity = NiceModal.create(
({ handleComplete }: InterfaceCreateIdentityProps): JSX.Element => {
export const CreateIdentityModal = NiceModal.create(
({ handleComplete }: CreateIdentityModalProps): JSX.Element => {

Check failure on line 16 in src/refactor/ui/components/modals/create-identity/create-identity.tsx

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node

'handleComplete' is declared but its value is never read.
/* const { handlePurchaseIdentity, isLoading, setForcedPage } = useMasa(); */
const modal = useModal();
const { company } = useConfig();
Expand Down
@@ -1 +1 @@
export { InterfaceCreateIdentity } from './create-identity';
export { CreateIdentityModal } from './create-identity';

0 comments on commit 8532407

Please sign in to comment.