• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

Button is not defined

23.08.01 17:42 작성 조회수 153

0

프로필 탭 들어갈 시

 

Button is not defined 이라는 오류가 뜹니다

 

제 코드는

 

import React from "react";
import PropTypes from "prop-types";
import { List } from "antd";
import Item from "antd/lib/list/Item";
import { StopOutlined } from "@ant-design/icons";
import { isStyledComponent, keyframes } from "styled-components";

const FollowList = ({ header, data }) => {
  return (
    <List
      style={{ marginBottom: 20 }}
      grid={{ gutter: 4, xs: 2, md: 3 }}
      size="small"
      header={<div>{header}</div>}
      loadMore={
        <div style={{ textAlign: "center", margin: "10px 0" }}>
          <Button>더 보기</Button>
        </div>
      }
      bordered
      dataSource={data}
      renderItem={(Item) => (
        <List.Item style={{ marginTop: 20 }}>
          <Card actions={[<StopOutlined key="stop" />]}>
            <Card.Meta description={Item.Nickname} />
          </Card>
        </List.Item>
      )}
    />
  );
};

FollowList.propTypes = {
  header: PropTypes.string.isRequired,
  data: PropTypes.array.isRequired,
};

export default FollowList;

입니다 무엇이 문제 일까요?

답변 2

·

답변을 작성해보세요.

0

lsw0810222님의 프로필

lsw0810222

질문자

2023.08.01

감사합니다

 

0

Button import 하세요