diff --git a/components/RoomCard/RoomCard.tsx b/components/RoomCard/RoomCard.tsx
index 41601f7..17e76ed 100644
--- a/components/RoomCard/RoomCard.tsx
+++ b/components/RoomCard/RoomCard.tsx
@@ -30,7 +30,13 @@ const UserInfo = ({ userInfo }: UserInfoProps) => {
const age = formatAge(userInfo.birthDate);
const handleUserClick = () => {
- router.push('/userInfo');
+ router.push(
+ {
+ pathname: '/userInfo',
+ query: { data: JSON.stringify(userInfo) },
+ },
+ '/userInfo'
+ );
};
return (
diff --git a/pages/liked/index.tsx b/pages/liked/index.tsx
index 8e09a5f..d2b509f 100644
--- a/pages/liked/index.tsx
+++ b/pages/liked/index.tsx
@@ -1,10 +1,9 @@
/* eslint-disable react/no-unstable-nested-components */
import React from 'react';
-import NoPosting from '@/public/icons/noPosting.svg';
-import Step1 from '@/pages/room/addRoom/step1.tsx';
+import NoLiked from '@/public/icons/noLiked.svg';
import useModal from '@/hooks/useModal';
import DefaultLayout from '@/components/layouts/DefaultLayout';
-// import { useRouter } from 'next/router';
+import { Nav } from '@/components/index.tsx';
// TODO 데이터가 구체화되면 바꿔줘야함
interface MyPostingProps {
@@ -26,15 +25,15 @@ export default function Liked({ roomInfo }: MyPostingProps) {
};
/**
- * 룸이 없을 때 보여주는 Component
+ * 좋아요 없을 때 보여주는 Component
*/
const NoPostings = () => {
const noPostingStyle = 'text-[20px] font-bold mt-[29px] text-center';
- const containerStyle = 'h-screen flex flex-col items-center justify-start mt-[135px]'; // 'justify-start'로 변경
+ const containerStyle = 'flex flex-col items-center justify-start mt-[135px]'; // 'justify-start'로 변경
return (
-
+
{`You don't have liked room`}
{`There aren't any rooms you liked yet.`}
Find places that you like!
@@ -48,12 +47,20 @@ export default function Liked({ roomInfo }: MyPostingProps) {
Look around
+
);
};
/**
- * 룸이 있을 때 보여주는 Component (TODO : 구체화 해줘야함)
+ * 좋아요 있을 때 보여주는 Component (TODO : 구체화 해줘야함)
*/
const MyLiked = () => {
return 호이호이
;
diff --git a/pages/userInfo/index.tsx b/pages/userInfo/index.tsx
index 32cb230..0e272aa 100644
--- a/pages/userInfo/index.tsx
+++ b/pages/userInfo/index.tsx
@@ -1,14 +1,20 @@
import React from 'react';
import { Nav, ProfileCard } from '@/components/index.tsx';
+import { useRouter } from 'next/router';
+import { formatAge, formatDate, formatPrice } from '@/utils/transform';
interface UserProfileProps {
imgSrc: string;
}
export default function UserProfile({ imgSrc }: UserProfileProps) {
+ const router = useRouter();
+ const { query } = router;
+ const userInfo = query.data ? JSON.parse(query.data as string) : {};
+ const age = formatAge(userInfo.year);
return (
<>
-
+
diff --git a/pages/userInfo/myPostings.tsx b/pages/userInfo/myPostings.tsx
index 003a8ed..9eb4ef3 100644
--- a/pages/userInfo/myPostings.tsx
+++ b/pages/userInfo/myPostings.tsx
@@ -4,6 +4,7 @@ import NoPosting from '@/public/icons/noPosting.svg';
import Step1 from '@/pages/room/addRoom/step1.tsx';
import useModal from '@/hooks/useModal';
import DefaultLayout from '@/components/layouts/DefaultLayout';
+import { Nav } from '@/components/index.tsx';
// import { useRouter } from 'next/router';
// TODO 데이터가 구체화되면 바꿔줘야함
@@ -30,7 +31,7 @@ export default function MyPosting({ roomInfo }: MyPostingProps) {
*/
const NoPostings = () => {
const noPostingStyle = 'text-[20px] font-bold mt-[29px] text-center';
- const containerStyle = 'h-screen flex flex-col items-center justify-start mt-[135px]'; // 'justify-start'로 변경
+ const containerStyle = 'flex flex-col items-center justify-start mt-[135px]'; // 'justify-start'로 변경
return (
@@ -46,6 +47,14 @@ export default function MyPosting({ roomInfo }: MyPostingProps) {
+ Add post
+
);
};
diff --git a/public/icons/noLiked.svg b/public/icons/noLiked.svg
new file mode 100644
index 0000000..4b2c1f1
--- /dev/null
+++ b/public/icons/noLiked.svg
@@ -0,0 +1,22 @@
+