Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useState, useEffect } from 'react';
import { setActiveState } from '../../../../api/admin/active/setActiveState';
type AdminSessionCardProps = {
title: string;
imageUrl: string | null;
name: string | null;
from: string | null;
id: number;
Expand All @@ -18,6 +19,7 @@ type AdminSessionCardProps = {

const AdminSessionCard: React.FC<AdminSessionCardProps> = ({
title,
imageUrl,
name,
from,
id,
Expand Down Expand Up @@ -61,7 +63,9 @@ const AdminSessionCard: React.FC<AdminSessionCardProps> = ({
</S.TopContainer>
<S.TitleWrapper>{title}</S.TitleWrapper>
</S.HeaderContainer>
{name && <ProfileContents name={name} from={from} />}
{name && (
<ProfileContents imageUrl={imageUrl} name={name} from={from} />
)}
</S.ContentsContainer>

<S.BtnContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ProfileContents from '../../profileContents/ProfileContents';

type AdminSessionMessageCardProps = {
title: string;
imageUrl?: string | null;
name?: string | null;
from?: string | null;
id: number;
Expand All @@ -15,6 +16,7 @@ type AdminSessionMessageCardProps = {

const AdminSessionMessageCard: React.FC<AdminSessionMessageCardProps> = ({
title,
imageUrl,
name,
from,
id,
Expand Down Expand Up @@ -44,7 +46,13 @@ const AdminSessionMessageCard: React.FC<AdminSessionMessageCardProps> = ({
</S.TopContainer>
<S.TitleWrapper>{title}</S.TitleWrapper>
</S.HeaderContainer>
{name && <ProfileContents name={name ?? null} from={from ?? null} />}
{name && (
<ProfileContents
imageUrl={imageUrl}
name={name ?? null}
from={from ?? null}
/>
)}
</S.ContentsContainer>
</S.CardContainer>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/profileContents/ProfileContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Profile from '../../common/profile/Profile';
type ProfileProps = {
name?: string | null;
from?: string | null;
imageUrl?: string;
imageUrl?: string | null;
isActive?: boolean;
};

Expand Down
1 change: 0 additions & 1 deletion src/components/card/user/conferenceCard/ConferenceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const ConferenceCard: React.FC<ConferenceCardProps> = ({
imageUrl,
onClick,
}) => {
console.log('img:', imageUrl);
return (
<S.CardContainer onClick={onClick}>
{imageUrl && <Img size={100} imageUrl={imageUrl} />}
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as S from './Profile.style';

type ProfileProps = {
size?: 'L' | 'M' | 'S';
imageUrl?: string;
imageUrl?: string | null;
};

const Profile: React.FC<ProfileProps> = ({ size = 'M', imageUrl }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/admin/AdminConferenceInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const AdminConferenceInfo = () => {
state="disabled"
placeholder={sessionData?.speakerName}
/>
<Profile size="L" />
<Profile imageUrl={sessionData?.speakerImage} size="L" />
</S.ProfileBox>
</>
)}
Expand Down
1 change: 1 addition & 0 deletions src/pages/admin/MessageSend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ const MessageSend = () => {
<AdminSessionMessageCard
key={data.id}
title={data.name}
imageUrl={data.speakerImage}
name={data.speakerName}
from={data.speakerOrganization}
id={data.id}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/admin/adminDashboard/AdminDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ const AdminDashboard = () => {
name,
endTime,
startTime,
speakerImage,
speakerName,
speakerOrganization,
location,
isActive,
} = data;
return (
<AdminSessionCard
key={id}
title={name}
date={formatTimeRange(startTime, endTime)}
imageUrl={speakerImage}
name={speakerName}
from={speakerOrganization}
id={id}
Expand Down