Skip to content

Commit

Permalink
πŸ’„ 정보가 ν™•μΈλ˜μ§€ μ•ŠλŠ” μ±„νŒ… μ°Έμ—¬μžλ₯Ό μœ„ν•œ μŠ€νƒ€μΌ μΆ”κ°€
Browse files Browse the repository at this point in the history
  • Loading branch information
js43o committed Dec 10, 2023
1 parent 9e974da commit 5235841
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export function ChatList({
return chatItem.messageType === 'talk' ? (
<MemorizedTalkItem
key={chatItem.date.toString()}
nickname={participantInfo?.nickname || ''}
profilePicture={participantInfo?.profilePicture || ''}
nickname={participantInfo?.nickname}
profilePicture={participantInfo?.profilePicture}
contents={chatItem.contents}
date={chatItem.date}
isMine={chatItem.user === userId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { UserChip } from '@/components';
import * as styles from './ChatItem.css';

type TalkItemProps = {
nickname: string;
profilePicture: string;
nickname?: string;
profilePicture?: string;
contents: string;
date: Date;
isMine: boolean;
Expand Down
4 changes: 4 additions & 0 deletions app/frontend/src/components/UserChip/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ export const profileImage = style({
borderRadius: '50%',
overflow: 'hidden',
});

export const unknown = style({
color: vars.color.grayscale200,
});
6 changes: 4 additions & 2 deletions app/frontend/src/components/UserChip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { vars } from '@/styles';
import * as styles from './index.css';

type UserChipProps = {
username: string;
username?: string;
profileSrc?: string;
};

Expand All @@ -22,7 +22,9 @@ export function UserChip({ username, profileSrc }: UserChipProps) {
<Profile width={24} height={24} fill={vars.color.morakGreen} />
)}
</div>
<span className={styles.nickname}>{username}</span>
<span className={`${styles.nickname} ${!username && styles.unknown}`}>
{username || '(μ•Œ 수 μ—†μŒ)'}
</span>
</div>
);
}

0 comments on commit 5235841

Please sign in to comment.