Closed KIMGEUNDU closed 1 year ago
์ ํฌ svg ํ์ผ ์ฉ๋์ด ๋๋ฌด ์ปค์ png๋ก ๋ณ๊ฒฝํ์ต๋๋ค.
โEmptyContents.jsx
import NotCogi from './NotCogi';
import { string } from 'prop-types';
EmptyContents.propTypes = {
children: string,
};
function EmptyContents({ children }) {
return (
<>
<NotCogi />
<p className="text-center text-[30px] text-ec1 text-xl mt-6">
{children}
</p>
</>
);
}
export default EmptyContents;
โEmptyPage.jsx
import { Helmet } from 'react-helmet-async';
import Header from '@/components/Header';
import Nav from '@/components/Nav';
import EmptyContents from '@/components/EmptyContents';
function Empty() {
return (
<>
<Helmet>
<title>์ฝํ
์ธ ์์</title>
</Helmet>
<div className="max-w-[600px] min-w-[320px] bg-ec4 flex flex-col items-center min-h-[100vh] m-auto py-20 relative justify-center">
<Header>์ฝํ
์ธ ์์</Header>
<EmptyContents />
<Nav />
</div>
</>
);
}
export default Empty;
โ NotCogi.jsx
import { string } from 'prop-types';
import notCogi from '@/assets/notCogi.png';
NotCogi.propTypes = {
width: string,
};
function NotCogi({ width = 'w-72' }) {
return (
<img className={`${width}`} src={notCogi} alt="๊ฒ์๊ธ์์" aria-hidden />
);
}
export default NotCogi;
โKeyLogo.jsx
import { Link } from 'react-router-dom';
import key from '/keyLogo.png';
import { string } from 'prop-types';
KeyLogo.propTypes = {
path: string,
};
function KeyLogo({ path = '' }) {
return (
<Link to={path} className="w-20 pt-[10%]">
<img src={key} alt="๋ฐฉํ๋ฌ ๋ก๊ณ ์ด์ " aria-hidden />
</Link>
);
}
export default KeyLogo;
โ CogiLogo.jsx
import { string } from 'prop-types';
import cogiLogo from '/cogiLogo.png';
CogiLogo.propTypes = {
width: string,
};
function CogiLogo({ width = 'w-72' }) {
return (
<img
className={`${width}`}
src={cogiLogo}
alt="๋ฐฉํ๋ฌ๋ก๊ณ - ์ฐ์์ฝ๊ธฐ"
aria-hidden
/>
);
}
export default CogiLogo;
๐๏ธ public
๐๏ธ assets
๊ฐ์ง๊ณ ๊ณ์ SVG ํ์ผ ์ ๋ถ ์ง์์ฃผ์ธ์ฉ!!
โญ ๋ณํฉํ๋ฉด์ ์ด์ฐจํผ ํฉ์ณ์ง ๊บผ๋ผ์ ์์๋ก ๋จ๊ฒจ๋๊ฒ ์ต๋๋ค!!!