Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
dd264f58
Unverified
Commit
dd264f58
authored
May 18, 2020
by
jmgr2996
Committed by
GitHub
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: Remove redundant imports in several examples (#13030)
parent
97a61a18
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
19 additions
and
62 deletions
+19
-62
about.js
examples/auth0/pages/about.js
+0
-2
index.js
examples/auth0/pages/index.js
+0
-2
profile.js
examples/auth0/pages/profile.js
+0
-2
Clock.js
examples/with-apollo-and-redux/components/Clock.js
+0
-1
Counter.js
examples/with-apollo-and-redux/components/Counter.js
+0
-1
ErrorMessage.js
examples/with-apollo-and-redux/components/ErrorMessage.js
+0
-1
Layout.js
examples/with-apollo-and-redux/components/Layout.js
+0
-1
PostUpvoter.js
examples/with-apollo-and-redux/components/PostUpvoter.js
+0
-1
apollo.js
examples/with-apollo-and-redux/lib/apollo.js
+0
-1
redux.js
examples/with-apollo-and-redux/lib/redux.js
+0
-1
index.js
examples/with-apollo-and-redux/pages/index.js
+0
-1
redux.js
examples/with-apollo-and-redux/pages/redux.js
+0
-1
PostUpvoter.js
examples/with-apollo/components/PostUpvoter.js
+0
-1
apollo.js
examples/with-apollo/lib/apollo.js
+0
-1
Counter.js
examples/with-context-api/components/Counter.js
+3
-3
about.js
examples/with-context-api/pages/about.js
+0
-1
index.js
examples/with-context-api/pages/index.js
+0
-1
index.js
examples/with-docker/pages/index.js
+0
-2
_app.js
examples/with-emotion/pages/_app.js
+0
-1
CharacterInfo.js
examples/with-redux-observable/components/CharacterInfo.js
+0
-1
_app.js
examples/with-redux-observable/pages/_app.js
+0
-1
index.js
examples/with-redux-observable/pages/index.js
+2
-2
other.js
examples/with-redux-observable/pages/other.js
+0
-1
counter.js
examples/with-redux-persist/components/counter.js
+1
-1
data-list.js
examples/with-redux-persist/components/data-list.js
+1
-1
with-redux-store.js
examples/with-redux-persist/lib/with-redux-store.js
+2
-2
_app.js
examples/with-redux-persist/pages/_app.js
+0
-1
index.js
examples/with-redux-persist/pages/index.js
+2
-2
clock.js
examples/with-redux-saga/components/clock.js
+0
-2
counter.js
examples/with-redux-saga/components/counter.js
+1
-1
_app.js
examples/with-redux-saga/pages/_app.js
+0
-1
index.js
examples/with-redux-saga/pages/index.js
+2
-2
other.js
examples/with-redux-saga/pages/other.js
+2
-2
clock.js
examples/with-redux-thunk/components/clock.js
+0
-2
counter.js
examples/with-redux-thunk/components/counter.js
+0
-1
examples.js
examples/with-redux-thunk/components/examples.js
+0
-1
with-redux-store.js
examples/with-redux-thunk/lib/with-redux-store.js
+2
-2
_app.js
examples/with-redux-thunk/pages/_app.js
+0
-1
index.js
examples/with-redux-thunk/pages/index.js
+1
-1
show-redux-state.js
examples/with-redux-thunk/pages/show-redux-state.js
+0
-1
clock.js
examples/with-redux-toolkit/components/clock.js
+0
-1
counter.js
examples/with-redux-toolkit/components/counter.js
+0
-1
_app.js
examples/with-redux-toolkit/pages/_app.js
+0
-1
index.js
examples/with-redux-toolkit/pages/index.js
+0
-1
README.md
examples/with-styled-components/README.md
+0
-2
_app.js
examples/with-styled-components/pages/_app.js
+0
-1
index.js
examples/with-styled-components/pages/index.js
+0
-1
No files found.
examples/auth0/pages/about.js
View file @
dd264f58
import
React
from
'react'
import
Layout
from
'../components/layout'
import
Layout
from
'../components/layout'
import
{
useFetchUser
}
from
'../lib/user'
import
{
useFetchUser
}
from
'../lib/user'
...
...
examples/auth0/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
Layout
from
'../components/layout'
import
Layout
from
'../components/layout'
import
{
useFetchUser
}
from
'../lib/user'
import
{
useFetchUser
}
from
'../lib/user'
...
...
examples/auth0/pages/profile.js
View file @
dd264f58
import
React
from
'react'
// This import is only needed when checking authentication status directly from getInitialProps
// This import is only needed when checking authentication status directly from getInitialProps
// import auth0 from '../lib/auth0'
// import auth0 from '../lib/auth0'
import
{
useFetchUser
}
from
'../lib/user'
import
{
useFetchUser
}
from
'../lib/user'
...
...
examples/with-apollo-and-redux/components/Clock.js
View file @
dd264f58
import
React
from
'react'
import
{
useSelector
,
shallowEqual
}
from
'react-redux'
import
{
useSelector
,
shallowEqual
}
from
'react-redux'
const
useClock
=
()
=>
{
const
useClock
=
()
=>
{
...
...
examples/with-apollo-and-redux/components/Counter.js
View file @
dd264f58
import
React
from
'react'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
const
useCounter
=
()
=>
{
const
useCounter
=
()
=>
{
...
...
examples/with-apollo-and-redux/components/ErrorMessage.js
View file @
dd264f58
import
React
from
'react'
import
PropTypes
from
'prop-types'
import
PropTypes
from
'prop-types'
const
ErrorMessage
=
({
message
})
=>
(
const
ErrorMessage
=
({
message
})
=>
(
...
...
examples/with-apollo-and-redux/components/Layout.js
View file @
dd264f58
import
React
from
'react'
import
Nav
from
'./Nav'
import
Nav
from
'./Nav'
import
PropTypes
from
'prop-types'
import
PropTypes
from
'prop-types'
...
...
examples/with-apollo-and-redux/components/PostUpvoter.js
View file @
dd264f58
import
React
from
'react'
import
{
useMutation
}
from
'@apollo/react-hooks'
import
{
useMutation
}
from
'@apollo/react-hooks'
import
gql
from
'graphql-tag'
import
gql
from
'graphql-tag'
import
PropTypes
from
'prop-types'
import
PropTypes
from
'prop-types'
...
...
examples/with-apollo-and-redux/lib/apollo.js
View file @
dd264f58
import
React
from
'react'
import
Head
from
'next/head'
import
Head
from
'next/head'
import
{
ApolloProvider
}
from
'@apollo/react-hooks'
import
{
ApolloProvider
}
from
'@apollo/react-hooks'
import
{
ApolloClient
}
from
'apollo-client'
import
{
ApolloClient
}
from
'apollo-client'
...
...
examples/with-apollo-and-redux/lib/redux.js
View file @
dd264f58
import
React
from
'react'
import
{
Provider
}
from
'react-redux'
import
{
Provider
}
from
'react-redux'
import
{
initializeStore
}
from
'../store'
import
{
initializeStore
}
from
'../store'
import
App
from
'next/app'
import
App
from
'next/app'
...
...
examples/with-apollo-and-redux/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
{
useDispatch
}
from
'react-redux'
import
{
useDispatch
}
from
'react-redux'
import
{
withRedux
}
from
'../lib/redux'
import
{
withRedux
}
from
'../lib/redux'
import
{
compose
}
from
'redux'
import
{
compose
}
from
'redux'
...
...
examples/with-apollo-and-redux/pages/redux.js
View file @
dd264f58
import
React
from
'react'
import
{
useDispatch
}
from
'react-redux'
import
{
useDispatch
}
from
'react-redux'
import
{
withRedux
}
from
'../lib/redux'
import
{
withRedux
}
from
'../lib/redux'
import
useInterval
from
'../lib/useInterval'
import
useInterval
from
'../lib/useInterval'
...
...
examples/with-apollo/components/PostUpvoter.js
View file @
dd264f58
import
React
from
'react'
import
{
useMutation
}
from
'@apollo/react-hooks'
import
{
useMutation
}
from
'@apollo/react-hooks'
import
gql
from
'graphql-tag'
import
gql
from
'graphql-tag'
...
...
examples/with-apollo/lib/apollo.js
View file @
dd264f58
import
React
from
'react'
import
App
from
'next/app'
import
App
from
'next/app'
import
Head
from
'next/head'
import
Head
from
'next/head'
import
{
ApolloProvider
}
from
'@apollo/react-hooks'
import
{
ApolloProvider
}
from
'@apollo/react-hooks'
...
...
examples/with-context-api/components/Counter.js
View file @
dd264f58
import
React
,
{
useReducer
,
us
eContext
}
from
'react'
import
{
useReducer
,
useContext
,
creat
eContext
}
from
'react'
const
CounterStateContext
=
React
.
createContext
()
const
CounterStateContext
=
createContext
()
const
CounterDispatchContext
=
React
.
createContext
()
const
CounterDispatchContext
=
createContext
()
const
reducer
=
(
state
,
action
)
=>
{
const
reducer
=
(
state
,
action
)
=>
{
switch
(
action
.
type
)
{
switch
(
action
.
type
)
{
...
...
examples/with-context-api/pages/about.js
View file @
dd264f58
import
React
from
'react'
import
Link
from
'next/link'
import
Link
from
'next/link'
import
{
useCount
,
useDispatchCount
}
from
'../components/Counter'
import
{
useCount
,
useDispatchCount
}
from
'../components/Counter'
...
...
examples/with-context-api/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
Link
from
'next/link'
import
Link
from
'next/link'
import
{
useCount
,
useDispatchCount
}
from
'../components/Counter'
import
{
useCount
,
useDispatchCount
}
from
'../components/Counter'
...
...
examples/with-docker/pages/index.js
View file @
dd264f58
import
React
from
'react'
export
default
()
=>
{
export
default
()
=>
{
return
<
h1
>
Hello
World
!<
/h1
>
return
<
h1
>
Hello
World
!<
/h1
>
}
}
examples/with-emotion/pages/_app.js
View file @
dd264f58
import
*
as
React
from
'react'
import
NextApp
from
'next/app'
import
NextApp
from
'next/app'
import
{
CacheProvider
}
from
'@emotion/core'
import
{
CacheProvider
}
from
'@emotion/core'
...
...
examples/with-redux-observable/components/CharacterInfo.js
View file @
dd264f58
import
React
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
const
CharacterInfo
=
({
const
CharacterInfo
=
({
...
...
examples/with-redux-observable/pages/_app.js
View file @
dd264f58
import
React
from
'react'
import
{
Provider
}
from
'react-redux'
import
{
Provider
}
from
'react-redux'
import
App
from
'next/app'
import
App
from
'next/app'
import
withRedux
from
'next-redux-wrapper'
import
withRedux
from
'next-redux-wrapper'
...
...
examples/with-redux-observable/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
{
Component
}
from
'react'
import
Link
from
'next/link'
import
Link
from
'next/link'
import
{
of
,
Subject
}
from
'rxjs'
import
{
of
,
Subject
}
from
'rxjs'
import
{
StateObservable
}
from
'redux-observable'
import
{
StateObservable
}
from
'redux-observable'
...
@@ -7,7 +7,7 @@ import CharacterInfo from '../components/CharacterInfo'
...
@@ -7,7 +7,7 @@ import CharacterInfo from '../components/CharacterInfo'
import
{
rootEpic
}
from
'../redux/epics'
import
{
rootEpic
}
from
'../redux/epics'
import
*
as
actions
from
'../redux/actions'
import
*
as
actions
from
'../redux/actions'
class
Counter
extends
React
.
Component
{
class
Counter
extends
Component
{
static
async
getInitialProps
({
store
,
isServer
})
{
static
async
getInitialProps
({
store
,
isServer
})
{
const
state$
=
new
StateObservable
(
new
Subject
(),
store
.
getState
())
const
state$
=
new
StateObservable
(
new
Subject
(),
store
.
getState
())
const
resultAction
=
await
rootEpic
(
const
resultAction
=
await
rootEpic
(
...
...
examples/with-redux-observable/pages/other.js
View file @
dd264f58
import
React
from
'react'
import
Link
from
'next/link'
import
Link
from
'next/link'
const
OtherPage
=
()
=>
(
const
OtherPage
=
()
=>
(
...
...
examples/with-redux-persist/components/counter.js
View file @
dd264f58
import
React
,
{
Component
}
from
'react'
import
{
Component
}
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
bindActionCreators
}
from
'redux'
import
{
bindActionCreators
}
from
'redux'
import
{
incrementCount
,
decrementCount
,
resetCount
}
from
'../store'
import
{
incrementCount
,
decrementCount
,
resetCount
}
from
'../store'
...
...
examples/with-redux-persist/components/data-list.js
View file @
dd264f58
import
React
,
{
Component
}
from
'react'
import
{
Component
}
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
bindActionCreators
}
from
'redux'
import
{
bindActionCreators
}
from
'redux'
import
{
loadExampleData
,
loadingExampleDataFailure
}
from
'../store'
import
{
loadExampleData
,
loadingExampleDataFailure
}
from
'../store'
...
...
examples/with-redux-persist/lib/with-redux-store.js
View file @
dd264f58
import
React
from
'react'
import
{
Component
}
from
'react'
import
{
initializeStore
}
from
'../store'
import
{
initializeStore
}
from
'../store'
const
isServer
=
typeof
window
===
'undefined'
const
isServer
=
typeof
window
===
'undefined'
...
@@ -18,7 +18,7 @@ function getOrCreateStore(initialState) {
...
@@ -18,7 +18,7 @@ function getOrCreateStore(initialState) {
}
}
export
default
App
=>
{
export
default
App
=>
{
return
class
AppWithRedux
extends
React
.
Component
{
return
class
AppWithRedux
extends
Component
{
static
async
getInitialProps
(
appContext
)
{
static
async
getInitialProps
(
appContext
)
{
// Get or Create the store with `undefined` as initialState
// Get or Create the store with `undefined` as initialState
// This allows you to set a custom default initialState
// This allows you to set a custom default initialState
...
...
examples/with-redux-persist/pages/_app.js
View file @
dd264f58
import
App
from
'next/app'
import
App
from
'next/app'
import
React
from
'react'
import
withReduxStore
from
'../lib/with-redux-store'
import
withReduxStore
from
'../lib/with-redux-store'
import
{
Provider
}
from
'react-redux'
import
{
Provider
}
from
'react-redux'
import
{
persistStore
}
from
'redux-persist'
import
{
persistStore
}
from
'redux-persist'
...
...
examples/with-redux-persist/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
{
Component
}
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
startClock
,
serverRenderClock
}
from
'../store'
import
{
startClock
,
serverRenderClock
}
from
'../store'
import
Examples
from
'../components/examples'
import
Examples
from
'../components/examples'
class
Index
extends
React
.
Component
{
class
Index
extends
Component
{
static
getInitialProps
({
reduxStore
,
req
})
{
static
getInitialProps
({
reduxStore
,
req
})
{
const
isServer
=
!!
req
const
isServer
=
!!
req
// DISPATCH ACTIONS HERE ONLY WITH `reduxStore.dispatch`
// DISPATCH ACTIONS HERE ONLY WITH `reduxStore.dispatch`
...
...
examples/with-redux-saga/components/clock.js
View file @
dd264f58
import
React
from
'react'
const
pad
=
n
=>
(
n
<
10
?
`0
${
n
}
`
:
n
)
const
pad
=
n
=>
(
n
<
10
?
`0
${
n
}
`
:
n
)
const
format
=
t
=>
{
const
format
=
t
=>
{
...
...
examples/with-redux-saga/components/counter.js
View file @
dd264f58
import
React
,
{
Component
}
from
'react'
import
{
Component
}
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
increment
,
decrement
,
reset
}
from
'../actions'
import
{
increment
,
decrement
,
reset
}
from
'../actions'
...
...
examples/with-redux-saga/pages/_app.js
View file @
dd264f58
import
App
from
'next/app'
import
App
from
'next/app'
import
React
from
'react'
import
{
Provider
}
from
'react-redux'
import
{
Provider
}
from
'react-redux'
import
withRedux
from
'next-redux-wrapper'
import
withRedux
from
'next-redux-wrapper'
import
withReduxSaga
from
'next-redux-saga'
import
withReduxSaga
from
'next-redux-saga'
...
...
examples/with-redux-saga/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
{
Component
}
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
loadData
,
startClock
,
tickClock
}
from
'../actions'
import
{
loadData
,
startClock
,
tickClock
}
from
'../actions'
import
Page
from
'../components/page'
import
Page
from
'../components/page'
class
Index
extends
React
.
Component
{
class
Index
extends
Component
{
static
async
getInitialProps
(
props
)
{
static
async
getInitialProps
(
props
)
{
const
{
store
,
isServer
}
=
props
.
ctx
const
{
store
,
isServer
}
=
props
.
ctx
store
.
dispatch
(
tickClock
(
isServer
))
store
.
dispatch
(
tickClock
(
isServer
))
...
...
examples/with-redux-saga/pages/other.js
View file @
dd264f58
import
React
from
'react'
import
{
Component
}
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
startClock
,
tickClock
}
from
'../actions'
import
{
startClock
,
tickClock
}
from
'../actions'
import
Page
from
'../components/page'
import
Page
from
'../components/page'
class
Other
extends
React
.
Component
{
class
Other
extends
Component
{
static
async
getInitialProps
(
props
)
{
static
async
getInitialProps
(
props
)
{
const
{
store
,
isServer
}
=
props
.
ctx
const
{
store
,
isServer
}
=
props
.
ctx
store
.
dispatch
(
tickClock
(
isServer
))
store
.
dispatch
(
tickClock
(
isServer
))
...
...
examples/with-redux-thunk/components/clock.js
View file @
dd264f58
import
React
from
'react'
const
pad
=
n
=>
(
n
<
10
?
`0
${
n
}
`
:
n
)
const
pad
=
n
=>
(
n
<
10
?
`0
${
n
}
`
:
n
)
const
format
=
t
=>
const
format
=
t
=>
...
...
examples/with-redux-thunk/components/counter.js
View file @
dd264f58
import
React
from
'react'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
{
incrementCount
,
decrementCount
,
resetCount
}
from
'../actions'
import
{
incrementCount
,
decrementCount
,
resetCount
}
from
'../actions'
...
...
examples/with-redux-thunk/components/examples.js
View file @
dd264f58
import
React
from
'react'
import
{
useSelector
}
from
'react-redux'
import
{
useSelector
}
from
'react-redux'
import
Clock
from
'./clock'
import
Clock
from
'./clock'
import
Counter
from
'./counter'
import
Counter
from
'./counter'
...
...
examples/with-redux-thunk/lib/with-redux-store.js
View file @
dd264f58
import
React
from
'react'
import
{
Component
}
from
'react'
import
initializeStore
from
'../store'
import
initializeStore
from
'../store'
const
__NEXT_REDUX_STORE__
=
'__NEXT_REDUX_STORE__'
const
__NEXT_REDUX_STORE__
=
'__NEXT_REDUX_STORE__'
...
@@ -17,7 +17,7 @@ function getOrCreateStore(initialState) {
...
@@ -17,7 +17,7 @@ function getOrCreateStore(initialState) {
}
}
export
default
App
=>
{
export
default
App
=>
{
return
class
AppWithRedux
extends
React
.
Component
{
return
class
AppWithRedux
extends
Component
{
static
async
getInitialProps
(
appContext
)
{
static
async
getInitialProps
(
appContext
)
{
// Get or Create the store with `undefined` as initialState
// Get or Create the store with `undefined` as initialState
// This allows you to set a custom default initialState
// This allows you to set a custom default initialState
...
...
examples/with-redux-thunk/pages/_app.js
View file @
dd264f58
import
React
from
'react'
import
{
Provider
}
from
'react-redux'
import
{
Provider
}
from
'react-redux'
import
App
from
'next/app'
import
App
from
'next/app'
import
withReduxStore
from
'../lib/with-redux-store'
import
withReduxStore
from
'../lib/with-redux-store'
...
...
examples/with-redux-thunk/pages/index.js
View file @
dd264f58
import
React
,
{
PureComponent
}
from
'react'
import
{
PureComponent
}
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
Link
from
'next/link'
import
Link
from
'next/link'
import
{
startClock
,
serverRenderClock
}
from
'../actions'
import
{
startClock
,
serverRenderClock
}
from
'../actions'
...
...
examples/with-redux-thunk/pages/show-redux-state.js
View file @
dd264f58
import
React
from
'react'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
Link
from
'next/link'
import
Link
from
'next/link'
...
...
examples/with-redux-toolkit/components/clock.js
View file @
dd264f58
import
React
from
'react'
import
{
useSelector
,
shallowEqual
}
from
'react-redux'
import
{
useSelector
,
shallowEqual
}
from
'react-redux'
const
useClock
=
()
=>
{
const
useClock
=
()
=>
{
...
...
examples/with-redux-toolkit/components/counter.js
View file @
dd264f58
import
React
from
'react'
import
{
createAction
}
from
'@reduxjs/toolkit'
import
{
createAction
}
from
'@reduxjs/toolkit'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
import
{
useSelector
,
useDispatch
}
from
'react-redux'
...
...
examples/with-redux-toolkit/pages/_app.js
View file @
dd264f58
import
React
from
'react'
import
{
Provider
}
from
'react-redux'
import
{
Provider
}
from
'react-redux'
import
{
store
}
from
'../store'
import
{
store
}
from
'../store'
...
...
examples/with-redux-toolkit/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
{
createAction
}
from
'@reduxjs/toolkit'
import
{
createAction
}
from
'@reduxjs/toolkit'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
useInterval
from
'../lib/useInterval'
import
useInterval
from
'../lib/useInterval'
...
...
examples/with-styled-components/README.md
View file @
dd264f58
...
@@ -58,7 +58,6 @@ When wrapping a [Link](https://nextjs.org/docs/api-reference/next/link) from `ne
...
@@ -58,7 +58,6 @@ When wrapping a [Link](https://nextjs.org/docs/api-reference/next/link) from `ne
**components/StyledLink.js**
**components/StyledLink.js**
```
javascript
```
javascript
import
React
from
'react'
import
Link
from
'next/link'
import
Link
from
'next/link'
import
styled
from
'styled-components'
import
styled
from
'styled-components'
...
@@ -88,7 +87,6 @@ export default styled(StyledLink)`
...
@@ -88,7 +87,6 @@ export default styled(StyledLink)`
**pages/index.js**
**pages/index.js**
```
javascript
```
javascript
import
React
from
'react'
import
StyledLink
from
'../components/StyledLink'
import
StyledLink
from
'../components/StyledLink'
export
default
()
=>
(
export
default
()
=>
(
...
...
examples/with-styled-components/pages/_app.js
View file @
dd264f58
import
App
from
'next/app'
import
App
from
'next/app'
import
React
from
'react'
import
{
ThemeProvider
}
from
'styled-components'
import
{
ThemeProvider
}
from
'styled-components'
const
theme
=
{
const
theme
=
{
...
...
examples/with-styled-components/pages/index.js
View file @
dd264f58
import
React
from
'react'
import
styled
from
'styled-components'
import
styled
from
'styled-components'
const
Title
=
styled
.
h1
`
const
Title
=
styled
.
h1
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment