-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated libraries, typescript ^5, react ^18, examples
1249 => 929 packages 8 vulnerabilities (4 moderate, 3 high, 1 critical) => 0 vulnerabilities
- Loading branch information
Showing
33 changed files
with
54,049 additions
and
9,818 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/* | ||
!/.next/static/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# development | ||
/.yalc | ||
yalc.lock | ||
|
||
# misc | ||
.DS_Store | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a starter template for [Learn Next.js](https://nextjs.org/learn). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
webpack(config, { isServer }) { | ||
if (!isServer) { | ||
config.devtool = 'source-map' | ||
} | ||
|
||
return config | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev -p 3001", | ||
"start": "next start -p 3001" | ||
}, | ||
"dependencies": { | ||
"@rollbar/react": "^0.11.2", | ||
"next": "latest", | ||
"prop-types": "^15.8.1", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"rollbar": "^2.26.2" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
import Link from 'next/link' | ||
import Head from 'next/head' | ||
import styles from '../styles/Home.module.css' | ||
import React, { useEffect, useState } from 'react' | ||
import { Provider, ErrorBoundary, useRollbar } from '@rollbar/react' | ||
|
||
const rollbarConfig = { | ||
accessToken: '37f08875d00d474cbb34f7fe661878fa', | ||
endpoint: 'https://api.rollbar.com/api/1/item', //'https://api.rollbar.com/api/1/item', //'http://localhost:8000/api/1/item', | ||
captureUncaught: true, | ||
captureUnhandledRejections: true, | ||
payload: { | ||
environment: 'testenv', | ||
code_version: 'cf29e4a', | ||
client: { | ||
javascript: { | ||
source_map_enabled: true, | ||
code_version: 'cf29e4a', | ||
guess_uncaught_frames: true, | ||
}, | ||
}, | ||
server: { | ||
root: 'webpack://_N_E/./pages/', | ||
branch: 'main', | ||
}, | ||
person: { | ||
id: 1234, | ||
email: '[email protected]', | ||
username: 'localuser', | ||
}, | ||
}, | ||
}; | ||
|
||
export default function App() { | ||
console.log(rollbarConfig) | ||
return ( | ||
<Provider config={rollbarConfig}> | ||
<ErrorBoundary> | ||
<Home /> | ||
<AnotherError /> | ||
</ErrorBoundary> | ||
</Provider> | ||
); | ||
} | ||
|
||
function TestError() { | ||
const a = null | ||
return a.hello() | ||
} | ||
|
||
function AnotherError() { | ||
const rollbar = useRollbar() | ||
const [flag, setFlag] = useState(false) | ||
|
||
useEffect(() => { | ||
const a = null | ||
setFlag(true) | ||
a.hello() | ||
}) | ||
|
||
return (<>{flag}</>) | ||
} | ||
|
||
function Home() { | ||
return ( | ||
<div className={styles.container}> | ||
<Head> | ||
<title>Create Next App</title> | ||
<link rel="icon" href="/favicon.ico" /> | ||
</Head> | ||
|
||
<main> | ||
<h1 className={styles.title}> | ||
Read <Link href="https://nextjs.org">Next.js!</Link> | ||
</h1> | ||
|
||
<p className={styles.description}> | ||
Get started by editing <code>pages/index.js</code> | ||
</p> | ||
|
||
<div className={styles.grid}> | ||
<a href="https://nextjs.org/docs" className={styles.card}> | ||
<h3>Documentation →</h3> | ||
<p>Find in-depth information about Next.js features and API.</p> | ||
</a> | ||
|
||
<a href="https://nextjs.org/learn" className={styles.card}> | ||
<h3>Learn →</h3> | ||
<p>Learn about Next.js in an interactive course with quizzes!</p> | ||
</a> | ||
|
||
<a | ||
href="https://github.com/vercel/next.js/tree/canary/examples" | ||
className={styles.card} | ||
> | ||
<h3>Examples →</h3> | ||
<p>Discover and deploy boilerplate example Next.js projects.</p> | ||
</a> | ||
|
||
<a | ||
href="https://vercel.com/import?filter=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" | ||
className={styles.card} | ||
> | ||
<h3>Deploy →</h3> | ||
<p> | ||
Instantly deploy your Next.js site to a public URL with Vercel. | ||
</p> | ||
</a> | ||
</div> | ||
</main> | ||
|
||
<footer> | ||
<a | ||
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Powered by{' '} | ||
<img src="/vercel.svg" alt="Vercel" className={styles.logo} /> | ||
</a> | ||
</footer> | ||
|
||
<style jsx>{` | ||
main { | ||
padding: 5rem 0; | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
footer { | ||
width: 100%; | ||
height: 100px; | ||
border-top: 1px solid #eaeaea; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
footer img { | ||
margin-left: 0.5rem; | ||
} | ||
footer a { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-decoration: none; | ||
color: inherit; | ||
} | ||
code { | ||
background: #fafafa; | ||
border-radius: 5px; | ||
padding: 0.75rem; | ||
font-size: 1.1rem; | ||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, | ||
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace; | ||
} | ||
`}</style> | ||
|
||
<style jsx global>{` | ||
html, | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, | ||
Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, | ||
sans-serif; | ||
} | ||
* { | ||
box-sizing: border-box; | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
.container { | ||
min-height: 100vh; | ||
padding: 0 0.5rem; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.title a { | ||
color: #0070f3; | ||
text-decoration: none; | ||
} | ||
|
||
.title a:hover, | ||
.title a:focus, | ||
.title a:active { | ||
text-decoration: underline; | ||
} | ||
|
||
.title { | ||
margin: 0 0 1rem; | ||
line-height: 1.15; | ||
font-size: 3.6rem; | ||
} | ||
|
||
.title { | ||
text-align: center; | ||
} | ||
|
||
.title, | ||
.description { | ||
text-align: center; | ||
} | ||
|
||
.description { | ||
line-height: 1.5; | ||
font-size: 1.5rem; | ||
} | ||
|
||
.grid { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
|
||
max-width: 800px; | ||
margin-top: 3rem; | ||
} | ||
|
||
.card { | ||
margin: 1rem; | ||
flex-basis: 45%; | ||
padding: 1.5rem; | ||
text-align: left; | ||
color: inherit; | ||
text-decoration: none; | ||
border: 1px solid #eaeaea; | ||
border-radius: 10px; | ||
transition: | ||
color 0.15s ease, | ||
border-color 0.15s ease; | ||
} | ||
|
||
.card:hover, | ||
.card:focus, | ||
.card:active { | ||
color: #0070f3; | ||
border-color: #0070f3; | ||
} | ||
|
||
.card h3 { | ||
margin: 0 0 1rem 0; | ||
font-size: 1.5rem; | ||
} | ||
|
||
.card p { | ||
margin: 0; | ||
font-size: 1.25rem; | ||
line-height: 1.5; | ||
} | ||
|
||
.logo { | ||
height: 1em; | ||
} | ||
|
||
@media (max-width: 600px) { | ||
.grid { | ||
width: 100%; | ||
flex-direction: column; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
html, | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
font-family: | ||
Inter, | ||
-apple-system, | ||
BlinkMacSystemFont, | ||
Segoe UI, | ||
Roboto, | ||
Oxygen, | ||
Ubuntu, | ||
Cantarell, | ||
Fira Sans, | ||
Droid Sans, | ||
Helvetica Neue, | ||
sans-serif; | ||
} | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
img { | ||
max-width: 100%; | ||
height: auto; | ||
} |
Oops, something went wrong.