Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feed페이지 기획 반영 미비한 부분 구현 #87

Merged
merged 4 commits into from
Mar 9, 2024
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 @@ -13,7 +13,7 @@ import Schedule from './Schedule';
export interface RecommendationDTO {
id: number;
title: string;
profileImgUrl: string;
profileImgUrl?: string;
startDateTime: string;
endDateTime: string;
recommendations: Array<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ export const wrapper = style({
borderBottom: `1px solid ${colors.gray200}`,
});

export const profileImage = style({
export const profileImageWrapper = style({
overflow: 'hidden',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '5.6rem',
height: '5.6rem',
borderRadius: '40%',
backgroundColor: colors.background,
});

export const scheduleInfoWrapper = style({
flex: '1',
overflow: 'hidden',
});

export const scheduleDateWrapper = style({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ import { format, isSameDay } from 'date-fns';
import { ko } from 'date-fns/locale';
import Image from 'next/image';

import { wrapper, profileImage, scheduleDateWrapper, scheduleDateInfo } from './Schedule.css';
import {
wrapper,
profileImageWrapper,
scheduleInfoWrapper,
scheduleDateWrapper,
scheduleDateInfo,
} from './Schedule.css';

interface ScheduleProps {
title: string;
profileImgUrl: string;
profileImgUrl?: string;
startDateTime: string;
endDateTime: string;
}
Expand Down Expand Up @@ -37,14 +43,14 @@ function formatDateDuration(startDateTime: string, endDateTime: string) {
function Schedule({ title, profileImgUrl, startDateTime, endDateTime }: ScheduleProps) {
return (
<div className={wrapper}>
<Image
className={profileImage}
src={profileImgUrl}
width="56"
height="56"
alt="profile_image"
/>
<div>
<div className={profileImageWrapper}>
{profileImgUrl ? (
<Image src={profileImgUrl} width="56" height="56" alt="profile_image" />
) : (
<Icon name="calender-gray" size={30} />
)}
</div>
<div className={scheduleInfoWrapper}>
<Txt typography="h7">{title}</Txt>
<div className={scheduleDateWrapper}>
<Icon name="time-gray" size={18} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function ScheduleItem({ schedule }: ScheduleItemProps) {
alt="profile-image"
/>
) : (
<Icon name="calender-gray" size={20} />
<Icon name="calender-gray" size={30} />
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ async function UpcomingSchedule() {
/>
{schedules.map((schedule) => (
<Link
/** @todo 일정상세페이지 href 추가필요 */
href=""
href={`/schedule/${schedule.scheduleId}`}
key={schedule.scheduleId}
className={listItem}
>
Expand Down
2 changes: 1 addition & 1 deletion services/web/src/app/recommendation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function RecommendationPage() {
</div>
</div>
</List>
<NewsList recommendations={recommendations} />
{recommendations.length > 0 && <NewsList recommendations={recommendations} />}
</>
);
}
Expand Down
Loading