Skip to content

Commit

Permalink
feat: 분실물 게시판 기본 썸네일 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
ssu-it-support committed Oct 9, 2024
1 parent 20f507d commit 9b5464e
Show file tree
Hide file tree
Showing 8 changed files with 2,590 additions and 2,414 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/pages/lost-article/component/lostContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function LostContent({ initPosts, isLoading }: LostContentProps) {
<div key={post.postId} className="xs-pb[20px] sm:pb-[20px] md:pb-[20px] lg:pb-[20px]">
<PostCardMissing
size={size}
imgUrl={thumbnail}
imgUrl={thumbnail ? thumbnail : `image/default/thumbnail/default_thumbnail.png`}
title={post.title}
subtitle={post.content}
date={formattedDate}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/main/containers/MainScheduleSection.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useVeritasDay } from '../hook/useVeritas';

export function MainScheduleSection() {
const targetDate = '2024-09-30T00:00:00+09:00';
const targetDate = '2024-12-21T00:00:00+09:00';
const daysLeft = useVeritasDay(targetDate);

return (
<div className="h-[180px] w-full bg-primary text-primary-foreground">
<div className="flex h-full items-center justify-center text-center xs:gap-[1rem] sm:flex-row sm:gap-[1rem] md:flex-row md:gap-[1rem] lg:flex-col lg:gap-[7px] xl:flex-col xl:gap-[7px] xxl:flex-col xxl:gap-[7px]">
<div className="rounded bg-background px-[2rem] py-1 font-semibold text-primary sm:text-xl md:text-xl lg:text-2xl xl:text-2xl xxl:text-2xl">
대동제
종강
</div>
<h1 className="font-bold leading-none sm:text-2xl md:text-3xl lg:text-6xl xl:text-6xl xxl:text-6xl">
{`D-${daysLeft}`}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/notice/component/NoticeContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function NoticeContent({ initPosts, isLoading }: NoticeContentProps) {
subtitle={post.content}
date={formattedDate}
badgeType={status}
profileName={'US:SUM'}
profileName={post.author}
className="cursor-pointer"
onClick={() => handleCardClick(post.postId.toString(), post.postId, navigate)}
/>
Expand Down
1 change: 0 additions & 1 deletion src/pages/notice/hooks/useNoticeBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export function useNoticeBoard(boardCode: string) {
memberCode: selectedSubCategory,
q: searchQuery,
});
console.log(data);

const totalPages: number = data?.data?.pageInfo?.totalPages ?? 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ import { User } from '@phosphor-icons/react';

interface NoticeDetailTopSectionProps {
title: string;
author: string;
date: string;
}

export function NoticeDetailTopSection({ title, date }: NoticeDetailTopSectionProps) {
export function NoticeDetailTopSection({ title, date, author = '총학생회' }: NoticeDetailTopSectionProps) {
const formattedDate = date ? formatYYYYMMDDHHMM(date) : '';

const isCentral = ['총학생회', '중앙운영위원회', '중앙선거관리위원회', '동아리연합회'].includes(author);
const authorType = isCentral ? '중앙' : '단과대';

return (
<>
<div className="mt-[120px] flex flex-col">
<Breadcrumb items={items} />
<div className="mb-1 pt-[24px] text-2xl font-bold text-black">{title}</div>
<div className="flex items-center pb-[24px] pt-[8px] text-sm font-medium text-[#999999]">
<User className="mr-[3px]" />
중앙 | 총학생회 · {formattedDate}
{authorType} | {author} · {formattedDate}
</div>
</div>
<div className="h-[2px] w-full bg-[#E7E7E7]" />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/notice/noticeDetail/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function NoticeDetailPage() {

return (
<div className="px-[120px] xs:px-[20px] sm:px-[20px] md:px-[40px]">
<NoticeDetailTopSection title={postDetail.title} date={postDetail.createdAt} />
<NoticeDetailTopSection title={postDetail.title} author={postDetail.authorName} date={postDetail.createdAt} />
{isLoading ? (
<NoticeDetailLoading />
) : (
Expand Down
4,985 changes: 2,579 additions & 2,406 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 9b5464e

Please sign in to comment.