Skip to content

Commit

Permalink
Merge pull request #191 from bsideproject/feature/liked
Browse files Browse the repository at this point in the history
[feat] 404 Page, Liked Page 수정
  • Loading branch information
KinDDoGGang authored Oct 11, 2023
2 parents 9aeb0be + 30b2c30 commit 94bd4fb
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 34 deletions.
46 changes: 27 additions & 19 deletions pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
/* eslint-disable react/no-unstable-nested-components */
import React from 'react';
import NotFound from '@/public/icons/404_bg.svg';
import LinkLine from '@/public/icons/linkLine.svg';
import Typography from '@/components/Typography/Typography';
import ErrorPage from '@/public/icons/errorPageImage.svg';
import { useRouter } from 'next/router';

export default function NoPostings() {
const router = useRouter();
const noPostingStyle = 'text-[20px] font-bold mt-[29px] text-center';
const containerStyle = 'flex flex-col items-center justify-start mt-[135px]'; // 'justify-start'로 변경

const NotFoundPage = () => {
return (
<div className="flex items-center justify-center h-screen bg-g2">
<div className="w-[271px] h-[142px] relative">
<NotFound className="absolute inset-0" />
<div className="absolute inset-0 bg-g0 flex flex-col justify-end">
<span className="text-white text-2xl font-bold mb-2">
<Typography variant="header" customClassName="text-center">
Something&apos;s missing.
</Typography>
<Typography variant="label" customClassName="text-center">
This page is missing or you assembled <br /> the link incorrectly
</Typography>
</span>
<div className={containerStyle}>
<ErrorPage />
<div className={noPostingStyle}>{`Something's missing.`}</div>
<div className="text-[16px] text-g5 font-pretendard">This page is missing or you assembled</div>
<div className="text-[16px] text-g5 font-pretendard">the link incorrectly</div>
<div className="fixed bottom-[0px] w-full overflow-x-hidden left-[50%] translate-x-[-50%] px-[20px] max-w-max">
<div className="w-full">
<hr />
<div className="mb-[13px] space-x-[8px] max-w-max">
<button
className="font-pretendard text-[16px] font-semibold bg-r1 border border-solid border-r1 rounded-[2px] text-g0 w-full h-[48px] items-center "
onClick={() => window.history.back()}
type="button"
data-size="md"
>
Go back
</button>
</div>
</div>
</div>
</div>
);
};

export default NotFoundPage;
}
18 changes: 3 additions & 15 deletions pages/liked/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,14 @@ import NoLiked from '@/public/icons/noLiked.svg';
import useModal from '@/hooks/useModal';
import DefaultLayout from '@/components/layouts/DefaultLayout';
import { Nav } from '@/components/index.tsx';

import { useRouter } from 'next/router';
// TODO 데이터가 구체화되면 바꿔줘야함
interface MyPostingProps {
roomInfo: any | null;
}

export default function Liked({ roomInfo }: MyPostingProps) {
const { openModal } = useModal();
const handleAddPosting = () => {
// openModal({
// props: {
// title: 'Add Rooms',
// size: 'full',
// custom: true,
// customHeader: true,
// },
// children: <Step1 />,
// });
};

const router = useRouter();
/**
* 좋아요 없을 때 보여주는 Component
*/
Expand All @@ -40,7 +28,7 @@ export default function Liked({ roomInfo }: MyPostingProps) {
<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()}
onClick={() => router.push('/')}
type="button"
data-size="md"
>
Expand Down
40 changes: 40 additions & 0 deletions public/icons/errorPageImage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 94bd4fb

Please sign in to comment.