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
Binary file added public/hobby_cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mogakco_cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/side-project_cat.png
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/app/(user-page)/my-meeting/_features/Written.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Written = () => {
{allComments.map((comment) => (
<div key={comment.meetingId}>
{/* ๋ฐ์Šคํฌํƒ‘ */}
<div className="hidden border-b border-Cgray300 py-[42px] lg:flex">
<div className="flex hidden flex-col border-b border-Cgray300 py-[42px] lg:flex">
<HorizonCard
onClick={() =>
handleMoveDetailPage(comment.meetingId, comment.categoryTitle)
Expand Down
2 changes: 1 addition & 1 deletion src/app/meeting/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function MeetingListPage({ params }: { params: { category: string } }) {
notFound();
}
return (
<div className="mb-[130px] mt-[88px]">
<div className="mb-[130px] mt-[30px] md:mt-[50px] lg:mt-[50px]">
<FloatingButtonGroup />
<HydrationBoundary state={dehydrate(queryClient)}>
<RecommendMeeting />
Expand Down
22 changes: 15 additions & 7 deletions src/app/meeting/_features/MeetingExtraInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Profile from '@/assets/icon/profile.svg';
import { Button } from '@/components/ui/Button';
import { getDDay } from '@/util/date';
import Image from 'next/image';
import React from 'react';

interface MeetingExtraInfoProps {
Expand All @@ -10,6 +10,7 @@ interface MeetingExtraInfoProps {
meetingId: number;
variant?: 'desktop' | 'tablet' | 'mobile';
onClick?: () => void;
profilePic: string;
}

const MeetingExtraInfo = ({
Expand All @@ -18,6 +19,7 @@ const MeetingExtraInfo = ({
startDate,
variant = 'desktop',
onClick,
profilePic,
}: MeetingExtraInfoProps) => {
// ์Šคํƒ€์ผ ์กฐ๊ฑด ๋ถ„๊ธฐ
const isTablet = variant === 'tablet';
Expand All @@ -30,25 +32,31 @@ const MeetingExtraInfo = ({
<div
className={
isMobile
? 'typo-caption1 text-Cgray500'
: 'typo-head3 text-Cgray500'
? 'typo-caption1 mb-2 text-Cgray500'
: 'typo-head3 mb-2 text-Cgray500'
}
>
๋ชจ์ž„์žฅ
</div>
<div
className={`${isMobile ? 'typo-button2' : 'typo-head2'} mt-1 flex items-center text-Cgray700`}
>
<Profile className="mr-2 h-10 w-10 flex-shrink-0" />
<Image
src={`${profilePic}`}
alt="profile_img"
width={40}
height={40}
className="mr-2 h-10 w-10 flex-shrink-0 rounded-[50%] border-2 border-Cgray500 object-cover"
/>
<span className="truncate text-ellipsis">{name}</span>
</div>
</div>
<div className="flex flex-col">
<div
className={
isMobile
? 'typo-caption1 text-Cgray500'
: 'typo-head3 text-Cgray500'
? 'typo-caption1 mt-2 text-Cgray500'
: 'typo-head3 mt-2 text-Cgray500'
}
>
๋ชจ์ž„์‹œ์ž‘
Expand All @@ -62,7 +70,7 @@ const MeetingExtraInfo = ({
</div>

<Button
className={`mt-6 ${isTablet ? 'mt-[7px]' : 'mt-6'} ${
className={`mt-6 ${isTablet ? 'mt-[7px]' : isMobile ? 'mt-0' : 'mt-6'} ${
isMobile
? 'h-[46px] w-[311px]'
: 'md:h-[40px] md:w-[180px] lg:h-[46px] lg:w-[318px]'
Expand Down
38 changes: 27 additions & 11 deletions src/app/meeting/_features/MeetingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ import useInfiniteScroll from '@/hooks/common/useInfiniteScroll';
import useMediaQuery from '@/hooks/common/useMediaQuery';
import { useInfiniteSearchMeetings } from '@/hooks/queries/useMeetingQueries';
import useDebounce from '@/hooks/useDebounde';
import { filterOptions, translateCategoryNameToKor } from '@/util/searchFilter';
import {
filterOptions,
imageUrlByCategory,
translateCategoryNameToKor,
} from '@/util/searchFilter';
import { keepPreviousData } from '@tanstack/react-query';
import Image from 'next/image';
import { useParams, useRouter } from 'next/navigation';
import { ChangeEvent, useCallback, useState } from 'react';
import type { IMeetingSearchCondition, SearchMeeting } from 'types/meeting';
Expand Down Expand Up @@ -108,7 +113,15 @@ const MeetingList = () => {

return (
<div className="mt-12">
<div className="typo-head1 mb-10 px-4 text-Cgray800">
<div className="typo-head2 mb-10 flex items-center px-4 text-Cgray800 md:typo-head1">
<Image
className="mr-5"
src={imageUrlByCategory(categoryStr)}
alt={`${categoryStr}_image`}
width={40}
height={40}
unoptimized
/>
{translateCategoryNameToKor(categoryStr)} ๋ชจ์ž„ ๋ชฉ๋ก
</div>
<SearchInput
Expand Down Expand Up @@ -142,10 +155,10 @@ const MeetingList = () => {

{/* ๋ชจ์ž„ ๋ฆฌ์ŠคํŠธ ์›น๋ทฐ */}
{breakpoint === 'desktop' && (
<div className="flex-col sm:hidden lg:flex">
{allMeetings.map((meeting, index) => (
<div className="animate-fadeIn flex-col sm:hidden lg:flex">
{allMeetings.map((meeting) => (
<HorizonCard
className={`animate-fadeInUp ${index % 2 === 0 ? 'delay-100' : 'delay-200'}`}
className={`transform animate-fadeIn transition-all duration-700 ease-in-out hover:scale-105`}
onClick={handleMoveDetailPage}
key={meeting.meetingId}
meetingId={meeting.meetingId}
Expand All @@ -171,6 +184,7 @@ const MeetingList = () => {
startDate={meeting.startDate}
meetingId={meeting.meetingId}
variant="desktop"
profilePic={meeting.profilePic}
/>
</HorizonCard>
))}
Expand All @@ -179,11 +193,11 @@ const MeetingList = () => {

{/* ๋ชจ์ž„ ๋ฆฌ์ŠคํŠธ ํ…Œ๋ธ”๋ฆฟ๋ทฐ */}
{breakpoint === 'tablet' && (
<div className="hidden flex-col md:flex lg:hidden">
{allMeetings.map((meeting, index) => (
<div className="hidden animate-fadeIn flex-col md:flex lg:hidden">
{allMeetings.map((meeting) => (
<HorizonCard
onClick={handleMoveDetailPage}
className={`animate-fadeInUp items-center ${index % 2 === 0 ? 'delay-100' : 'delay-200'}`}
className={`transform animate-fadeIn items-center transition-all duration-700 ease-in-out hover:scale-105`}
key={meeting.meetingId}
meetingId={meeting.meetingId}
category={translateCategoryNameToKor(categoryStr)}
Expand All @@ -210,6 +224,7 @@ const MeetingList = () => {
startDate={meeting.startDate}
meetingId={meeting.meetingId}
variant="tablet"
profilePic={meeting.profilePic}
/>
</HorizonCard>
))}
Expand All @@ -218,11 +233,11 @@ const MeetingList = () => {

{/* ๋ชจ์ž„ ๋ฆฌ์ŠคํŠธ ๋ชจ๋ฐ”์ผ๋ทฐ */}
{breakpoint === 'mobile' && (
<div className="flex w-full flex-wrap items-center justify-center md:hidden lg:hidden">
{allMeetings.map((meeting, index) => (
<div className="flex w-full animate-fadeIn flex-wrap items-center justify-center md:hidden lg:hidden">
{allMeetings.map((meeting) => (
<VerticalCard
onClick={handleMoveDetailPage}
className={`h-[380px] animate-fadeInUp items-center ${index % 2 === 0 ? 'delay-100' : 'delay-200'}`}
className={`h-[380px] transform animate-fadeIn items-center transition-all duration-700 ease-in-out hover:scale-105 `}
thumbnailHeight={160}
thumbnailWidth={311}
category={translateCategoryNameToKor(categoryStr)}
Expand All @@ -249,6 +264,7 @@ const MeetingList = () => {
startDate={meeting.startDate}
meetingId={meeting.meetingId}
variant="mobile"
profilePic={meeting.profilePic}
/>
</VerticalCard>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/app/meeting/_features/NoResultsMeeting.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const NoResultsMeeting = () => {
return (
<div className="typo-head3 flex h-[776px] w-full items-center justify-center text-Cgray500">
<div className="typo-head3 flex h-[300px] w-full items-center justify-center text-Cgray500">
์กฐ๊ฑด์— ๋งž๋Š” ๋ชจ์ž„์ด ์—†์–ด์š” <br />
์ถ”์ฒœํ•˜๋Š” ๋ชจ์ž„์„ ๋‘˜๋Ÿฌ๋ณด์„ธ์š”!
</div>
Expand Down
16 changes: 14 additions & 2 deletions src/app/meeting/_features/RecommendMeeting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import HorizonCard from '@/components/ui/HorizonCard';
import VerticalCard from '@/components/ui/VerticalCard';
import { useTopMeetings } from '@/hooks/queries/useMeetingQueries';
import { translateCategoryNameToKor } from '@/util/searchFilter';
import {
imageUrlByCategory,
translateCategoryNameToKor,
} from '@/util/searchFilter';
import Image from 'next/image';
import { useParams, useRouter } from 'next/navigation';
import type { TopMeeting } from 'types/meeting';

Expand Down Expand Up @@ -34,7 +38,15 @@ const RecommendMeeting = () => {

return (
<>
<div className="typo-head1 mb-6 px-4 text-Cgray800">
<div className="typo-head2 mb-6 flex items-center px-4 text-Cgray800 md:typo-head1">
<Image
className="mr-5"
src={imageUrlByCategory(categoryStr)}
alt={`${categoryStr}_image`}
width={40}
height={40}
unoptimized
/>
Deving์˜ {translateCategoryNameToKor(categoryStr)} ์ถ”์ฒœ ๋ชจ์ž„
</div>

Expand Down
35 changes: 20 additions & 15 deletions src/components/ui/VerticalCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import useLikeHandler from '@/hooks/common/useLikeHandler';
import { getIconComponent } from '@/util/getIconDetail';
import { translateCategoryNameToEng } from '@/util/searchFilter';
import { useQueryClient } from '@tanstack/react-query';
import { Heart, Map } from 'lucide-react';
import { useRouter } from 'next/navigation';
import { useState } from 'react';
Expand Down Expand Up @@ -48,6 +47,7 @@ const VerticalCard = ({
showLikeButton = true,
searchQuery,
value,
likesCount,
total = 100,
skills,
}: VerticalCardProps) => {
Expand Down Expand Up @@ -112,24 +112,29 @@ const VerticalCard = ({
height={thumbnailHeight}
/>
</div>
<div className="mt-4">
<div className="typo-head2 relative flex h-[40px] justify-between truncate text-Cgray800 ">
<div className="w-full">
<div className="typo-head2 relative flex h-[53px] items-center justify-between truncate text-Cgray800 ">
<span className="max-w-[270px] overflow-hidden truncate text-ellipsis whitespace-nowrap">
{title}
</span>
{showLikeButton && (
<Button
className={`relative h-auto w-auto ${like ? 'animate-heartbeat' : ''}`}
variant="text"
size="sm"
onClick={(e) => handleLikeButton(e)}
icon={
<Heart
style={{ width: '24px', height: '24px' }}
className={isLike ? 'fill-main' : 'stroke-Cgray500'}
/>
}
></Button>
<div className="flex justify-center">
<Button
className={`relative h-auto w-auto ${like ? 'animate-heartbeat' : ''}`}
variant="text"
size="sm"
onClick={(e) => handleLikeButton(e)}
icon={
<Heart
style={{ width: '24px', height: '24px' }}
className={isLike ? 'fill-main' : 'stroke-Cgray500'}
/>
}
></Button>
<div className="typo-caption2 absolute top-7 mt-3 text-Cgray500">
{likesCount}
</div>
</div>
)}
</div>
<div className="relative flex items-center gap-1 truncate text-Cgray500">
Expand Down
15 changes: 15 additions & 0 deletions src/util/searchFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,18 @@ export const translateCategoryNameToEng = (category: string) => {
return 'mogakco';
}
};

export const imageUrlByCategory = (category: string) => {
switch (category) {
case 'mogakco':
return '/mogakco_cat.png';
case 'hobby':
return '/hobby_cat.png';
case 'study':
return '/read_cat.png';
case 'side-project':
return '/side-project_cat.png';
default:
return '/mogakco_cat.png';
}
};
5 changes: 5 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ export default {
sans: ['var(--font-pretendard)', 'sans-serif'],
},
keyframes: {
fadeIn: {
'0%': { opacity: '0' },
'100%': { opacity: '1' },
},
fadeInUp: {
'0%': { opacity: '0', transform: 'translateY(40px)' },
'100%': { opacity: '1', transform: 'translateY(0)' },
Expand All @@ -126,6 +130,7 @@ export default {
},
},
animation: {
fadeIn: 'fadeIn 0.5s ease-out forwards',
fadeInUp: 'fadeInUp 0.5s ease-out forwards',
slideUp: 'slideUp 0.5s ease-out forwards',
slideDown: 'slideDown 0.5s ease-out forwards',
Expand Down
Loading