Engineering

  1. Home
  2. Docs
  3. Engineering
  4. React Progressive Web App and NextJS
  5. Creating Normal (Authenticated) Pages and Static Routes

Creating Normal (Authenticated) Pages and Static Routes

You can use this template:

import React from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { Card, Typography } from 'antd';
import { useHistory, useIntl, useModel } from 'umi';
import styles from '../global.less';

export default (): React.ReactNode => {
  const intl = useIntl();
  const { initialState } = useModel('@@initialState');
  const history = useHistory();

  return (
    <PageContainer className={styles.container}>
      <Card>
        <Typography.Text>Hello, World</Typography.Text>
      </Card>
    </PageContainer>
  );
};

TODOs

1. Should be in Storybook or snippet library

Was this article helpful to you? Yes 1 No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *