-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/go-cham/gocham-service-web-r…
…eact-typescript into dev
- Loading branch information
Showing
6 changed files
with
45 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { useNavigate } from 'react-router-dom'; | ||
import { POST_TYPE } from '@/common/constants/post-type'; | ||
import { ReactComponent as NoPostIcon } from './no-post-icon.svg'; | ||
|
||
interface NoPostText { | ||
type: POST_TYPE; | ||
} | ||
|
||
export function NoPost({ type }: NoPostText) { | ||
const navigate = useNavigate(); | ||
|
||
const text = | ||
type === POST_TYPE.MY | ||
? '아직 작성한 게시물이 없어요.' | ||
: '투표하거나 댓글 남긴 게시글이 없어요.'; | ||
|
||
return ( | ||
<div | ||
className={ | ||
'absolute left-1/2 top-[45%] flex -translate-x-1/2 flex-col items-center' | ||
} | ||
> | ||
<NoPostIcon className={'h-[7.512rem] w-[7.496rem]'} /> | ||
<span className="mt-[1.688rem] font-system-body3">{text}</span> | ||
{type === POST_TYPE.MY && ( | ||
<span | ||
className="cursor-pointer text-mainSub-main-500 underline font-system-body4" | ||
onClick={() => navigate('/write')} | ||
> | ||
글 작성 시작 | ||
</span> | ||
)} | ||
</div> | ||
); | ||
} |
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 @@ | ||
export { NoPost } from './NoPost'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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