Fix: Consistent avatars for show pages (#1776)

- consistent avatars for show pages
This commit is contained in:
brendanlaschke
2023-09-30 08:32:00 +02:00
committed by GitHub
parent c06712f161
commit e3485cc609
3 changed files with 6 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { Tooltip } from 'react-tooltip';
import styled from '@emotion/styled';
import { v4 as uuidV4 } from 'uuid';
import { Avatar } from '@/users/components/Avatar';
import { Avatar, AvatarType } from '@/users/components/Avatar';
import {
beautifyExactDateTime,
beautifyPastDateRelativeToNow,
@ -18,6 +18,7 @@ type OwnProps = {
date: string;
renderTitleEditComponent?: () => JSX.Element;
onUploadPicture?: (file: File) => void;
avatarType: AvatarType;
};
const StyledShowPageSummaryCard = styled.div`
@ -77,6 +78,7 @@ export const ShowPageSummaryCard = ({
logoOrAvatar,
title,
date,
avatarType,
renderTitleEditComponent,
onUploadPicture,
}: OwnProps) => {
@ -102,7 +104,7 @@ export const ShowPageSummaryCard = ({
size="xl"
colorId={id}
placeholder={title}
type="rounded"
type={avatarType}
/>
<StyledFileInput
ref={inputFileRef}

View File

@ -90,6 +90,7 @@ export const CompanyShow = () => {
renderTitleEditComponent={() => (
<CompanyNameEditableField company={company} />
)}
avatarType="squared"
/>
<PropertyBox extraPadding={true}>
{companyShowFieldDefinition.map((fieldDefinition) => {

View File

@ -116,6 +116,7 @@ export const PersonShow = () => {
)
}
onUploadPicture={onUploadPicture}
avatarType="rounded"
/>
<PropertyBox extraPadding={true}>
{personShowFieldDefinition.map((fieldDefinition) => {