-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from bsideproject/moon
[feat] My -> myPosting 일단 추가
- Loading branch information
Showing
5 changed files
with
93 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import React from 'react'; | ||
import NoPosting from '@/public/icons/noPosting.svg'; | ||
import Step1 from '@/pages/room/addRoom/step1.tsx'; | ||
import useModal from '@/hooks/useModal'; | ||
|
||
//import { useRouter } from 'next/router'; | ||
|
||
|
||
// TODO 데이터가 구체화되면 바꿔줘야함 | ||
interface MyPostingProps { | ||
roomInfo : any | null; | ||
} | ||
|
||
export default function MyPosting({ roomInfo }: MyPostingProps) { | ||
const { openModal } = useModal(); | ||
|
||
const handleAddPosting = () => { | ||
openModal({ | ||
props: { | ||
title: 'Add Rooms', | ||
size: 'full', | ||
custom: true, | ||
customHeader: true, | ||
}, | ||
children: <Step1 />, | ||
}); | ||
}; | ||
|
||
/** | ||
* 룸이 없을 때 보여주는 Component | ||
*/ | ||
const NoPostings = () => { | ||
const noPostingStyle = 'text-[20px] font-bold mt-[29px] text-center'; | ||
const containerStyle = 'h-screen flex flex-col items-center justify-center'; | ||
|
||
return ( | ||
<div className={containerStyle}> | ||
<NoPosting /> | ||
<div className={noPostingStyle}> | ||
Click here to post and find roommates! | ||
</div> | ||
<div className="mt-[29px]"> | ||
<button | ||
className={`font-pretendard text-[16px] font-semibold bg-g0 border border-solid border-r1 rounded-[2px] text-r1 w-[120px] h-[48px]`} | ||
onClick={() => handleAddPosting()} | ||
type={'button'} | ||
data-size={'md'} | ||
> | ||
+ Add post | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
/** | ||
* 룸이 있을 때 보여주는 Component (TODO : 구체화 해줘야함) | ||
*/ | ||
const MyRooms = () => { | ||
|
||
return ( | ||
<div> | ||
호이호이 | ||
</div> | ||
); | ||
}; | ||
|
||
return ( | ||
(roomInfo || []).length === 0 ? <NoPostings /> : <MyRooms /> | ||
) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.