This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| createStore, applyMiddleware, compose, combineReducers, | |
| } from 'redux'; | |
| import thunkMiddleware from 'redux-thunk'; | |
| import reducer from '../modules/reducers'; | |
| let store = null; | |
| const reducers = combineReducers(reducer); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createStore } from 'redux' | |
| /** | |
| * This is a reducer, a pure function with (state, action) => state signature. | |
| * It describes how an action transforms the state into the next state. | |
| * | |
| * The shape of the state is up to you: it can be a primitive, an array, an object, | |
| * or even an Immutable.js data structure. The only important part is that you should | |
| * not mutate the state object, but return a new object if the state changes. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import Link from 'next/link'; | |
| import { Button } from 'antd'; | |
| import { css } from '@emotion/core'; | |
| import { | |
| Content, Footer, Header, Container, | |
| } from '../components/Layout'; | |
| const mainCls = css` | |
| max-width: 1000px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { css } from '@emotion/core'; | |
| export const headerCls = css` | |
| background-color: #04070b; | |
| box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1); | |
| ul { | |
| background-color: #04070b; | |
| li { | |
| cursor: pointer; | |
| color: #fff; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": ["@emotion/babel-preset-css-prop"], | |
| "plugins": [ | |
| ["import", { "libraryName": "antd", "style": "css" }], | |
| "@babel/plugin-proposal-class-properties" | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { node, string, oneOfType } from 'prop-types'; | |
| import { Layout } from 'antd'; | |
| const AppContent = Layout.Content; | |
| const Content = ({ children, ...props }) => | |
| <AppContent {...props}>{children}</AppContent>; | |
| Content.propTypes = { | |
| children: oneOfType([node, string]), | |
| }; | |
| export default Content; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { Button, Drawer } from 'antd'; | |
| import Link from 'next/link'; | |
| import { headerCls, drawerCls } from './styles'; | |
| import LeftMenu from './LeftMenu'; | |
| import RightMenu from './RightMenu'; | |
| class Header extends Component { | |
| state = { | |
| visible: false, |