mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 02:08:55 +02:00
chore(website): enable eslint in website (#5889)
* chore: enable eslint in website * Fixes * prettier users
This commit is contained in:
parent
0aba31de7b
commit
e0127c66be
29 changed files with 272 additions and 163 deletions
|
@ -5,12 +5,20 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React, {useState} from 'react';
|
||||
import React, {ReactNode, useState} from 'react';
|
||||
|
||||
export default function ErrorBoundaryTestButton({children = 'Boom!'}) {
|
||||
export default function ErrorBoundaryTestButton({
|
||||
children = 'Boom!',
|
||||
}: {
|
||||
children?: ReactNode;
|
||||
}): JSX.Element {
|
||||
const [state, setState] = useState(false);
|
||||
if (state) {
|
||||
throw new Error('Boom!');
|
||||
}
|
||||
return <button onClick={() => setState(true)}>{children}</button>;
|
||||
return (
|
||||
<button type="button" onClick={() => setState(true)}>
|
||||
{children}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue