refactor: import jest as global; unify import style of some modules (#6898)

* refactor: import jest as global

* fix react
This commit is contained in:
Joshua Chen 2022-03-11 19:04:27 +08:00 committed by GitHub
parent e97dc0d37e
commit c9ee6e467c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 177 additions and 139 deletions

View file

@ -5,12 +5,12 @@
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import React, {useRef} from 'react';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
export default function LinkTest(): JSX.Element {
const anchorRef = React.useRef<HTMLAnchorElement>(null);
const anchorRef = useRef<HTMLAnchorElement>(null);
return (
<Layout>
<main className="container margin-vert--xl">

View file

@ -102,7 +102,7 @@ import MyComponentSource from '!!raw-loader!@site/src/pages/examples/\_myCompone
```jsx live
function Demo() {
React.useEffect(() => console.log('mount'), []);
useEffect(() => console.log('mount'), []);
return null;
}
```