Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Pro-Pofol/Pro-Pofol_Client
Browse files Browse the repository at this point in the history
… into feature/#15-Login&Signup
  • Loading branch information
wjknnn committed May 22, 2024
2 parents eebcd64 + 5c3ffbc commit f9e63c0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
6 changes: 1 addition & 5 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,29 @@ const ApplyData: ApplicationBoxProps[] = [

interface TipBoxProps {
title: string;
content: string;
content?: string;
name: string;
date: string;
}

const TipData: TipBoxProps[] = [
{
title: '포트폴리오 만들 때 주의할 점',
content: '포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!',
name: '이강혁',
date: '2024-04-16'
},
{
title: '자기소개서는 이렇게',
content: '포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!',
name: '강진현',
date: '2024-04-10'
},
{
title: '이럭서에 뭘 넣어야 할지 모르겠다면?',
content: '포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!',
name: '임태곤',
date: '2024-04-06'
},
{
title: '합격하는 포트폴리오',
content: '포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!포트폴리오!! 비상!!!!',
name: '최승우',
date: '2023-04-18',
},
Expand Down
8 changes: 7 additions & 1 deletion src/components/ApplicationBox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'use client'

import { dateToString } from "@/utils"
import { useRouter } from "next/navigation"

interface ApplicationBoxProps {
tag: keyof typeof tagColor
Expand Down Expand Up @@ -26,8 +29,11 @@ const tagColor = {
```
*/
export const ApplicationBox = ({ tag, title, name, date, mainMajor, subMajor }: ApplicationBoxProps) => {

const router = useRouter();

return (
<div className="flex flex-col w-full p-8 gap-3 border border-gray100 bg-white rounded-3xl cursor-pointer">
<div onClick={()=>router.push('/application/1')} className="flex flex-col w-full p-8 gap-3 border border-gray100 bg-white rounded-3xl cursor-pointer">
<div className={`px-[11px] w-fit h-fit py-1 rounded-full text-labelLarge ${tagColor[tag]}`}>{tag}</div>
<div className="flex flex-col gap-2">
<span className="text-titleMedium text-black truncate">{title}</span>
Expand Down
34 changes: 24 additions & 10 deletions src/components/TipBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dateToString } from "@/utils";

interface TipBoxProps {
title: string
content: string
content?: string
name: string
date: string
}
Expand All @@ -17,14 +17,28 @@ interface TipBoxProps {
*/
export const TipBox = ({ title, content, name, date }: TipBoxProps) => {
return (
<div className="p-8 flex flex-col w-full min-w-[240px] gap-2.5 justify-between items-start border border-gray100 bg-white rounded-3xl cursor-pointer">
<span className="text-titleSmall text-black truncate w-full">{title}</span>
<span className="text-bodySmall text-gray500 line-clamp-2 w-full">{content}</span>
<div className="text-bodySmall text-gray600 flex justify-end items-center gap-2 w-fit sm:w-full text-nowrap">
<span>{name}</span>
<div className="w-0.5 h-0.5 bg-gray600 rounded-full" />
<span>{dateToString(date)}</span>
</div>
</div>
<>
{
content === undefined ?
<div className="p-8 flex sm:flex-col w-full min-w-[240px] gap-2.5 justify-between items-center sm:items-start border border-gray100 bg-white rounded-3xl cursor-pointer">
<span className="text-titleSmall text-black truncate w-full">{title}</span>
<div className="text-bodySmall text-gray600 flex justify-end items-center gap-2 w-fit sm:w-full text-nowrap">
<span>{name}</span>
<div className="w-0.5 h-0.5 bg-gray600 rounded-full" />
<span>{dateToString(date)}</span>
</div>
</div>
:
<div className="p-8 flex flex-col w-full min-w-[240px] gap-2.5 justify-between items-start border border-gray100 bg-white rounded-3xl cursor-pointer">
<span className="text-titleSmall text-black truncate w-full">{title}</span>
<span className="text-bodySmall text-gray500 line-clamp-2 w-full">{content}</span>
<div className="text-bodySmall text-gray600 flex items-center gap-2 w-fit sm:w-full text-nowrap">
<span>{name}</span>
<div className="w-0.5 h-0.5 bg-gray600 rounded-full" />
<span>{dateToString(date)}</span>
</div>
</div>
}
</>
)
}

0 comments on commit f9e63c0

Please sign in to comment.