작성
·
279
0
npm run dev 시
cosnt is not defined
가 뜹니다 제 코드는
import React from 'react';
import propTypes from 'prop-types';
import Link from 'next/link';
import { Menu, Input, Row, Col } from 'antd';
import 'antd/dist/antd.css'
import UserProfile from '../components/UserProfile';
import LoginForm from '../components/LoginForm';
const AppLayout = ({ children }) => {
cosnt [IsLoggedIn, setIsLoggedIn] = useState(false);
return (
<div>
<Menu mode="horizontal">
<Menu.Item>
<Link href="/"><a>노드버드</a></Link>
</Menu.Item>
<Menu.Item>
<Link href="/profile"><a>프로필</a></Link>
</Menu.Item>
<Menu.Item>
<Input.Search enterButton style={{verticalAlign: 'middle' }}/>
</Menu.Item>
<Menu.Item>
<Link href="/signup"><a>회원가입</a></Link>
</Menu.Item>
</Menu>
<Row gutter={8}>
<Col xs={24} md={6}>
{isLoggedIn ? <Userprofile /> : <LoginForm />}
</Col>
<Col xs={24} md={12}>
{children}
</Col>
<Col xs={24} md={6}>
<a href="" target='_blank' rel='noreferrer noopener'>Made by 0880</a>
</Col>
</Row>
</div>
);
};
AppLayout.propTypes = {
children: propTypes.node.isRequired,
}
export default AppLayout;
입니다 무엇이 문제 일까요
답변 2
0
0