Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,905 changes: 6,905 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
"lint": "next lint"
},
"dependencies": {
"next": "13.0.6",
"axios": "^1.2.3",
"next": "^13.1.2",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"styled-components": "^5.3.6"
},
"devDependencies": {
"eslint": "8.29.0",
Expand Down
7 changes: 6 additions & 1 deletion pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import GlobalStyle from "../styles/globalStyled"

function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
return (<>
<Component {...pageProps} />
<GlobalStyle />
</>
)
}

export default MyApp
58 changes: 58 additions & 0 deletions pages/_document.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from 'react'
import Document, {
Html,
Head,
Main,
NextScript
} from 'next/document'
import { ServerStyleSheet } from 'styled-components'

export default class MyDocument extends Document {
static async getInitialProps(
ctx
) {
const sheet = new ServerStyleSheet()
const originalRenderPage = ctx.renderPage

try {
ctx.renderPage = () =>
originalRenderPage({
enhanceApp: App => props => sheet.collectStyles(<App {...props} />)
})

const initialProps = await Document.getInitialProps(ctx)
return {
...initialProps,
styles: (
<>
{initialProps.styles}
{sheet.getStyleElement()}
</>
)
}
} finally {
sheet.seal()
}
}

render(){
return (
<Html lang="pt">
<Head>
<meta charSet="utf-8" />

<link
href="https://fonts.googleapis.com/css?family=Roboto:400,500,700"
rel="stylesheet"
/>

<link rel="icon" href="https://rocketseat.com.br/favicon.ico" />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
4 changes: 2 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export default function Home() {
return (
<div>
<h1>Hello, World!</h1>
<h1>Tela de todos pokemon!</h1>
</div>
)
}
}
10 changes: 10 additions & 0 deletions pages/pokedex/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@


export default function Pokedex () {

return(
<div>
<h1>estamos na tela da pokedex</h1>
</div>
)
}
Empty file added pages/pokedex/styled.js
Empty file.
8 changes: 8 additions & 0 deletions services/requestPokemon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import axios from "axios"



export const requestPokemon = () => {
axios
.get()
}
14 changes: 14 additions & 0 deletions styles/globalStyled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { createGlobalStyle } from 'styled-components';

const GlobalStyle = createGlobalStyle`
* {
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: #222;
color: #fff;
font-family: Open-Sans, Helvetica, Sans-Serif;
}
`;

export default GlobalStyle;
Loading