Skip to content

Commit

Permalink
refactor: rename components
Browse files Browse the repository at this point in the history
  • Loading branch information
thaisguigon committed Feb 21, 2024
1 parent fd11603 commit 4f4ca5c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { ConnectedAccount } from '@/accounts/types/ConnectedAccount';
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
import { SettingsAccountsSkeletonCard } from '@/settings/accounts/components/SettingsAccountsSkeletonCard';
import { SettingsAccountsListSkeletonCard } from '@/settings/accounts/components/SettingsAccountsSkeletonCard';
import { H2Title } from '@/ui/display/typography/components/H2Title';
import { Section } from '@/ui/layout/section/components/Section';

import { SettingsAccountsEmptyStateCard } from './SettingsAccountsEmptyStateCard';
import { SettingsAccountsListEmptyStateCard } from './SettingsAccountsEmptyStateCard';

export const SettingsAccountsCalendarSettingsSection = () => {
const currentWorkspaceMember = useRecoilValue(currentWorkspaceMemberState);
Expand All @@ -30,9 +30,9 @@ export const SettingsAccountsCalendarSettingsSection = () => {
/>

{loading ? (
<SettingsAccountsSkeletonCard />
<SettingsAccountsListSkeletonCard />
) : !accounts.length ? (
<SettingsAccountsEmptyStateCard />
<SettingsAccountsListEmptyStateCard />
) : null}
</Section>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { H2Title } from '@/ui/display/typography/components/H2Title';
import { Section } from '@/ui/layout/section/components/Section';

import { SettingsAccountsCard } from './SettingsAccountsCard';
import { SettingsAccountsEmptyStateCard } from './SettingsAccountsEmptyStateCard';
import { SettingsAccountsListEmptyStateCard } from './SettingsAccountsListEmptyStateCard';

export const SettingsAccountsConnectedAccountsSection = ({
accounts,
Expand All @@ -30,7 +30,7 @@ export const SettingsAccountsConnectedAccountsSection = ({
onAccountRemove={handleAccountRemove}
/>
) : (
<SettingsAccountsEmptyStateCard />
<SettingsAccountsListEmptyStateCard />
)}
</Section>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { MessageChannel } from '@/accounts/types/MessageChannel';
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
import { useFindManyRecords } from '@/object-record/hooks/useFindManyRecords';
import { SettingsAccountsSkeletonCard } from '@/settings/accounts/components/SettingsAccountsSkeletonCard';
import { SettingsAccountsListSkeletonCard } from '@/settings/accounts/components/SettingsAccountsSkeletonCard';
import { H2Title } from '@/ui/display/typography/components/H2Title';
import { Section } from '@/ui/layout/section/components/Section';

import { SettingsAccountsEmailsCard } from './SettingsAccountsEmailsCard';
import { SettingsAccountsEmptyStateCard } from './SettingsAccountsEmptyStateCard';
import { SettingsAccountsListEmptyStateCard } from './SettingsAccountsEmptyStateCard';

export const SettingsAccountsEmailsSyncSection = () => {
const currentWorkspaceMember = useRecoilValue(currentWorkspaceMemberState);
Expand Down Expand Up @@ -52,13 +52,13 @@ export const SettingsAccountsEmailsSyncSection = () => {
/>

{loading ? (
<SettingsAccountsSkeletonCard />
<SettingsAccountsListSkeletonCard />
) : accounts.length ? (
<SettingsAccountsEmailsCard
messageChannels={messageChannelsWithSyncedEmails}
/>
) : (
<SettingsAccountsEmptyStateCard />
<SettingsAccountsListEmptyStateCard />
)}
</Section>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ const StyledBody = styled(CardContent)`
justify-content: center;
`;

type SettingsAccountsEmptyStateCardProps = {
type SettingsAccountsListEmptyStateCardProps = {
label?: string;
};

export const SettingsAccountsEmptyStateCard = ({
export const SettingsAccountsListEmptyStateCard = ({
label,
}: SettingsAccountsEmptyStateCardProps) => {
}: SettingsAccountsListEmptyStateCardProps) => {
const [generateTransientToken] = useGenerateTransientTokenMutation();

const handleGmailLogin = useCallback(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ const StyledCard = styled(Card)`
height: 40px;
`;

export { StyledCard as SettingsAccountsSkeletonCard };
export { StyledCard as SettingsAccountsListSkeletonCard };
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { H2Title } from '@/ui/display/typography/components/H2Title';
import { Section } from '@/ui/layout/section/components/Section';

import { SettingsAccountsEmptyStateCard } from './SettingsAccountsEmptyStateCard';
import { SettingsAccountsListEmptyStateCard } from './SettingsAccountsEmptyStateCard';

export const SettingsNewAccountSection = () => {
return (
Expand All @@ -10,7 +10,7 @@ export const SettingsNewAccountSection = () => {
title="New account"
description="Connect a new account to your workspace"
/>
<SettingsAccountsEmptyStateCard label="Connect a Google account" />
<SettingsAccountsListEmptyStateCard label="Connect a Google account" />
</Section>
);
};

0 comments on commit 4f4ca5c

Please sign in to comment.