Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit b8593af

Browse files
committed
chore(update-pkgs): mainly next.js
1.add css plugin 2.use new dynamic import 3.move title -> _app.js
1 parent 76482d5 commit b8593af

File tree

13 files changed

+519
-434
lines changed

13 files changed

+519
-434
lines changed

components/StateTree/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ let StateTreeWithNoSSR = null
1010
// example: https://github.com/zeit/next.js/issues/219
1111
export default class StateViewer extends React.Component {
1212
componentDidMount() {
13-
StateTreeWithNoSSR = dynamic(import('./StateTree'), { ssr: false })
13+
// StateTreeWithNoSSR = dynamic(import('./StateTree'), { ssr: false })
14+
StateTreeWithNoSSR = dynamic({
15+
loader: () => import('./StateTree'),
16+
ssr: false,
17+
})
1418
}
1519

1620
render() {

containers/Preview/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ import * as logic from './logic'
3737
const debug = makeDebugger('C:Preview')
3838
/* eslint-enable no-unused-vars */
3939

40-
const DynamicTypeWriter = dynamic(import('../TypeWriter'), {
40+
const DynamicTypeWriter = dynamic({
41+
loader: () => import('../TypeWriter'),
4142
/* eslint-disable */
4243
loading: () => <TypeWriterLoading />,
4344
/* eslint-enable */
45+
srr: false,
4446
})
4547

4648
const CloseBtn = ({ type }) => (

containers/Sidebar/styles/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const ExploreIcon = styled(Img)`
107107
margin-top: -1px;
108108
`
109109

110-
export const MenuItem = styled.ul`
110+
export const MenuItem = styled.div`
111111
margin-top: 0px;
112112
left: 0;
113113
position: relative;
@@ -116,7 +116,7 @@ export const MenuItem = styled.ul`
116116
overflow-y: scroll;
117117
transition: left 0.2s;
118118
`
119-
export const MenuItemWrapper = styled.li`
119+
export const MenuItemWrapper = styled.div`
120120
display: block;
121121
&:hover {
122122
background: ${theme('sidebar.menuHover')};

containers/ThemeWrapper/NormalizeStyle.js

Lines changed: 0 additions & 186 deletions
This file was deleted.

containers/ThemeWrapper/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,14 @@ import { ThemeProvider } from 'styled-components'
1111
import { storePlug } from '../../utils'
1212

1313
import AntOverWrite from './AntOverWrite'
14-
import NormalizeStyle from './NormalizeStyle'
1514
// import MarkDownStyle from './MarkDownStyle'
1615
import CodeHighlight from './CodeHighlight'
17-
18-
// TODO: mv MarkDownStyle && CodeHighlight to it's own container
16+
import './normalize.css'
1917

2018
const ThemeObserver = ({ children, theme }) => (
2119
<ThemeProvider theme={theme.themeData}>
2220
<AntOverWrite>
2321
<CodeHighlight>
24-
<style global jsx>
25-
{NormalizeStyle}
26-
</style>
2722
<style global jsx>{`
2823
html {
2924
background-color: ${theme.themeData.htmlBg};

0 commit comments

Comments
 (0)