TypeError: Cannot read property 'props' of undefined react

TypeError: Cannot read property 'props' of undefined react

我是 React js 的新手,下面的 React 代码给我这个错误
"TypeError: Cannot read property 'props' of undefined at Button (D:\my-app.next\server\static\PqudrDXAzXfiQCJ2zK-7F\pages\index.js:408:59)."

请帮我解决一下,谢谢

这是我的 index.js

import React, { Component } from 'react';
import Link from 'next/link';
import Head from '../components/head';
import Nav from '../components/nav';
import Button from '../components/Button';
export default () => (
<div>
<Head title="Home" />
<Nav />
<Button text="Demo Button" />
</div>
);

这是我的 Button.js 文件

import React from 'react';
import './button.css';
import { string } from 'prop-types';

const Button = (props) => (
<button>{ props.text } </button>
);
Button.propTypes = {
text: string
 };

export default Button;

请检查这个工作示例:

import React from "react";
import { string } from "prop-types";
const Button = props => <button> {props.text} </button>;
Button.propTypes = {
  text: string
};
export default () => (
  <div>
    <Button text="Demo Button" />
  </div>
);