use useDocusaurusConfig instead of importing siteConfig
*/
/* eslint-disable lint/no-value-import */
-import siteConfig from '../../docusaurus.config';
import Container from '../core/Container';
+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import * as React from 'react';
/* eslint-enable lint/no-value-import */
-class Users extends React.Component {
- render() {
+const Users = () => {
+ const {siteConfig} = useDocusaurusContext();
const showcase = siteConfig.customFields.users.map(user => {
return (
<a href={user.infoLink} key={user.caption}>
@@ -43,8 +43,7 @@ class Users extends React.Component {
</Container>
</div>
);
- }
-}
+};
export default props => (
<Layout>
