Skip to content

Commit

Permalink
update imports to use ZUIPersonAvatar instead of old ZUIAvatar
Browse files Browse the repository at this point in the history
  • Loading branch information
rebecarubio committed Sep 7, 2023
1 parent 68f9db2 commit fe8cf86
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/features/events/components/EventContactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import EventDataModel from 'features/events/models/EventDataModel';
import messageIds from 'features/events/l10n/messageIds';
import { useMessages } from 'core/i18n';
import { ZetkinEvent } from 'utils/types/zetkin';
import ZUIAvatar from 'zui/ZUIAvatar';
import ZUIPersonAvatar from 'zui/ZUIPersonAvatar';
import ZUICard from 'zui/ZUICard';

Check failure on line 14 in src/features/events/components/EventContactCard.tsx

View workflow job for this annotation

GitHub Actions / lint / Test (18, ubuntu-latest)

Imports should be sorted alphabetically
import { ZUIConfirmDialogContext } from 'zui/ZUIConfirmDialogProvider';
import ZUIPersonHoverCard from 'zui/ZUIPersonHoverCard';
Expand Down Expand Up @@ -40,7 +40,7 @@ const ContactDetails: FC<ContactDetailsProps> = ({ contact, model, orgId }) => {
<>
<Box m={1} sx={{ display: 'inline-block', verticalAlign: 'middle' }}>
<ZUIPersonHoverCard personId={contact.id}>
<ZUIAvatar orgId={orgId} personId={contact.id} />
<ZUIPersonAvatar orgId={orgId} personId={contact.id} />
</ZUIPersonHoverCard>
</Box>
<Typography sx={{ display: 'inline-block', verticalAlign: 'middle' }}>
Expand Down
4 changes: 2 additions & 2 deletions src/features/events/components/ParticipantListSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import filterParticipants from '../utils/filterParticipants';
import noPropagate from 'utils/noPropagate';
import { removeOffset } from 'utils/dateUtils';
import { useMessages } from 'core/i18n';
import ZUIAvatar from 'zui/ZUIAvatar';
import ZUIPersonAvatar from 'zui/ZUIPersonAvatar';
import ZUINumberChip from '../../../zui/ZUINumberChip';

Check failure on line 21 in src/features/events/components/ParticipantListSection.tsx

View workflow job for this annotation

GitHub Actions / lint / Test (18, ubuntu-latest)

Imports should be sorted alphabetically
import ZUIPersonHoverCard from 'zui/ZUIPersonHoverCard';
import ZUIRelativeTime from 'zui/ZUIRelativeTime';
Expand Down Expand Up @@ -124,7 +124,7 @@ const ParticipantListSection: FC<ParticipantListSectionListProps> = ({
hideSortIcons: true,
renderCell: (params) => (
<ZUIPersonHoverCard personId={params.row.id}>
<ZUIAvatar orgId={orgId} personId={params.row.id} />
<ZUIPersonAvatar orgId={orgId} personId={params.row.id} />
</ZUIPersonHoverCard>
),
resizable: false,
Expand Down
4 changes: 2 additions & 2 deletions src/zui/ZUIAccessList/AccessListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, ListItem, Typography } from '@mui/material';
import { FC, ReactNode } from 'react';

import ZUIAvatar from 'zui/ZUIAvatar';
import ZUIPersonAvatar from 'zui/ZUIPersonAvatar';

interface AccessListItemProps {
action?: ReactNode;
Expand All @@ -21,7 +21,7 @@ const AccessListItem: FC<AccessListItemProps> = ({
<ListItem>
<Box alignItems="center" display="flex" gap={2} width="100%">
<Box>
<ZUIAvatar orgId={orgId} personId={personId} size="sm" />
<ZUIPersonAvatar orgId={orgId} personId={personId} size="sm" />
</Box>
<Box flexGrow={1}>
<Typography component="div">{title}</Typography>
Expand Down
2 changes: 1 addition & 1 deletion src/zui/ZUIPersonAvatar/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ZUIPersonAvatar from '.';

export default {
component: ZUIPersonAvatar,
title: 'Atoms/ZUIAvatar',
title: 'Atoms/ZUIPersonAvatar',
} as ComponentMeta<typeof ZUIPersonAvatar>;

const Template: ComponentStory<typeof ZUIPersonAvatar> = (args) => {
Expand Down
6 changes: 3 additions & 3 deletions src/zui/ZUIPersonGridCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useRouter } from 'next/router';
import { Avatar, Box, SxProps, Tooltip } from '@mui/material';

import { ZetkinPerson } from 'utils/types/zetkin';
import ZUIAvatar from 'zui/ZUIAvatar';
import ZUIPersonAvatar from 'zui/ZUIPersonAvatar';

const ZUIPersonGridCell: FC<{
onClick?: () => void;
Expand All @@ -31,11 +31,11 @@ const ZUIPersonGridCell: FC<{
{tooltip ? (
// Person with tooltip
<Tooltip title={`${person.first_name} ${person.last_name}`}>
<ZUIAvatar orgId={orgId} personId={person.id} />
<ZUIPersonAvatar orgId={orgId} personId={person.id} />
</Tooltip>
) : (
// Person without tooltip
<ZUIAvatar orgId={orgId} personId={person.id} />
<ZUIPersonAvatar orgId={orgId} personId={person.id} />
)}
</Box>
);
Expand Down
6 changes: 3 additions & 3 deletions src/zui/ZUIPersonGridEditCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { FC, HTMLAttributes, useState } from 'react';
import { useMessages } from 'core/i18n';
import { usePersonSelect } from './ZUIPersonSelect';
import { ZetkinPerson } from 'utils/types/zetkin';
import ZUIAvatar from 'zui/ZUIAvatar';
import ZUIPersonAvatar from 'zui/ZUIPersonAvatar';

import messageIds from './l10n/messageIds';

Expand Down Expand Up @@ -292,7 +292,7 @@ const PersonListItem: FC<{
justifyContent: 'center',
}}
>
<ZUIAvatar orgId={orgId} personId={person.id} size="sm" />
<ZUIPersonAvatar orgId={orgId} personId={person.id} size="sm" />
<Typography component="span">
{`${person.first_name} ${person.last_name}`}
</Typography>
Expand All @@ -307,7 +307,7 @@ const SelectedPerson: FC<{ orgId: number; person: ZetkinPerson }> = ({
}) => {
return (
<>
<ZUIAvatar orgId={orgId} personId={person.id} size="lg" />
<ZUIPersonAvatar orgId={orgId} personId={person.id} size="lg" />
<Typography>{`${person.first_name} ${person.last_name}`}</Typography>
</>
);
Expand Down

0 comments on commit fe8cf86

Please sign in to comment.