FRONTENDSCHOOL6 / escape12

ํ”„๋ก ํŠธ์—”๋“œ์Šค์ฟจ 6๊ธฐ '์ด๊ฒŒ๋ฌด์Šจ12์ด์•ผ'์กฐ
1 stars 3 forks source link

๐Ÿ”ง์ž˜๋ชป๋œ ์ด๋ฏธ์ง€ ํฌ๋ฉง๊ณผ ์„ฑ๋Šฅ ์ตœ์ ํ™” ๋ฌธ์ œ #43

Closed KIMGEUNDU closed 1 year ago

KIMGEUNDU commented 1 year ago

โญ ๋ณ‘ํ•ฉํ•˜๋ฉด์„œ ์–ด์ฐจํ”ผ ํ•ฉ์ณ์งˆ ๊บผ๋ผ์„œ ์ž„์‹œ๋กœ ๋‚จ๊ฒจ๋†“๊ฒ ์Šต๋‹ˆ๋‹ค!!!

KIMGEUNDU commented 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;
KIMGEUNDU commented 1 year ago

๐Ÿ—‚๏ธ public

Image Image

KIMGEUNDU commented 1 year ago

๐Ÿ—‚๏ธ assets

Image

KIMGEUNDU commented 1 year ago

๊ฐ€์ง€๊ณ  ๊ณ„์‹  SVG ํŒŒ์ผ ์ „๋ถ€ ์ง€์›Œ์ฃผ์„ธ์šฉ!!