parent
6e88841397
commit
f4d3e9f46f
@ -0,0 +1,26 @@ |
||||
{ |
||||
"parser": "@typescript-eslint/parser", |
||||
"extends": [ |
||||
"eslint:recommended", |
||||
"plugin:@typescript-eslint/recommended", |
||||
"plugin:react/recommended", |
||||
"plugin:prettier/recommended", |
||||
"plugin:import/typescript", |
||||
"prettier" |
||||
], |
||||
"plugins": ["@typescript-eslint", "react", "react-hooks", "import"], |
||||
"rules": { |
||||
"@typescript-eslint/explicit-function-return-type": "off", |
||||
"@typescript-eslint/no-non-null-assertion": "off", |
||||
"react/prop-types": "off", |
||||
"react-hooks/rules-of-hooks": "error", |
||||
"react-hooks/exhaustive-deps": "warn", |
||||
"import/first": "warn", |
||||
"import/no-unused-modules": "warn" |
||||
}, |
||||
"settings": { |
||||
"react": { |
||||
"version": "detect" |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
|
||||
node_modules/ |
||||
.next/ |
||||
.vercel/ |
||||
.vscode/snipsnap.code-snippets |
||||
public/ |
||||
|
||||
.gitignore |
||||
.eslintrc |
||||
package-lock.json |
||||
yarn.lock |
||||
.prettierignore |
||||
.env |
||||
.env.local |
||||
LICENSE |
@ -0,0 +1,7 @@ |
||||
import React from "react"; |
||||
|
||||
const EditLink: React.FC = () => { |
||||
return <div />; |
||||
}; |
||||
|
||||
export default EditLink; |
@ -0,0 +1,7 @@ |
||||
import React from "react"; |
||||
|
||||
const Link: React.FC = () => { |
||||
return <div />; |
||||
}; |
||||
|
||||
export default Link; |
@ -0,0 +1,7 @@ |
||||
import React from "react"; |
||||
|
||||
const Preview: React.FC = () => { |
||||
return <div />; |
||||
}; |
||||
|
||||
export default Preview; |
@ -0,0 +1,3 @@ |
||||
export { default as Link } from "./Link"; |
||||
export { default as EditLink } from "./EditLink"; |
||||
export { default as Preview } from "./Preview"; |
@ -0,0 +1,2 @@ |
||||
/// <reference types="next" />
|
||||
/// <reference types="next/types/global" />
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@ |
||||
import '../styles/globals.css' |
||||
|
||||
function MyApp({ Component, pageProps }) { |
||||
return <Component {...pageProps} /> |
||||
} |
||||
|
||||
export default MyApp |
@ -0,0 +1,9 @@ |
||||
import type { AppProps } from "next/app"; |
||||
import React from "react"; |
||||
import "styles/globals.css"; |
||||
|
||||
const MyApp: React.FC<AppProps> = ({ Component, pageProps }) => ( |
||||
<Component {...pageProps} /> |
||||
); |
||||
|
||||
export default MyApp; |
@ -1,5 +0,0 @@ |
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
|
||||
export default (req, res) => { |
||||
res.status(200).json({ name: 'John Doe' }) |
||||
} |
@ -0,0 +1,88 @@ |
||||
import Head from "next/head"; |
||||
import React from "react"; |
||||
import { GetStaticProps } from "next"; |
||||
import styles from "styles/Home.module.css"; |
||||
|
||||
export const getStaticProps: GetStaticProps = async () => { |
||||
// TODO: Fetch links here
|
||||
|
||||
return { |
||||
props: { data: null }, // will be passed to the page component as props
|
||||
// Next.js will attempt to re-generate the page:
|
||||
// - When a request comes in
|
||||
// - At most once every second
|
||||
revalidate: 1, |
||||
}; |
||||
}; |
||||
|
||||
const Editor: React.FC = ({ data }: any) => { |
||||
console.log({ data }); |
||||
|
||||
return ( |
||||
// TODO: Remove starter code
|
||||
<div className={styles.container}> |
||||
<Head> |
||||
<title>Create Next App</title> |
||||
<link rel="icon" href="/favicon.ico" /> |
||||
</Head> |
||||
|
||||
<main className={styles.main}> |
||||
<div className="max-w-md mx-auto text-red-600 hover:text-red-700"> |
||||
<div> |
||||
<h1 className={styles.title}> |
||||
Welcome to <a href="https://nextjs.org">Next.js!</a> |
||||
</h1> |
||||
</div> |
||||
</div> |
||||
|
||||
<p className={styles.description}> |
||||
Get started by editing{" "} |
||||
<code className={styles.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/master/examples" |
||||
className={styles.card} |
||||
> |
||||
<h3>Examples →</h3> |
||||
<p>Discover and deploy boilerplate example Next.js projects.</p> |
||||
</a> |
||||
|
||||
<a |
||||
href="https://vercel.com/new?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 className={styles.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 Logo" className={styles.logo} /> |
||||
</a> |
||||
</footer> |
||||
</div> |
||||
); |
||||
}; |
||||
|
||||
export default Editor; |
@ -0,0 +1,84 @@ |
||||
import React from "react"; |
||||
import Head from "next/head"; |
||||
import { GetStaticProps } from "next"; |
||||
import styles from "styles/Home.module.css"; |
||||
|
||||
export const getStaticProps: GetStaticProps = async () => { |
||||
// TODO: Fetch links here
|
||||
|
||||
return { |
||||
props: { links: [] }, // will be passed to the page component as props
|
||||
// Next.js will attempt to re-generate the page:
|
||||
// - When a request comes in
|
||||
// - At most once every second
|
||||
revalidate: 1, |
||||
}; |
||||
}; |
||||
|
||||
const Home: React.FC = ({ links }: any) => { |
||||
console.log({ links }); |
||||
|
||||
// TODO: Remove starter code
|
||||
return ( |
||||
<div className={styles.container}> |
||||
<Head> |
||||
<title>Create Next App</title> |
||||
<link rel="icon" href="/favicon.ico" /> |
||||
</Head> |
||||
|
||||
<main className={styles.main}> |
||||
<h1 className={styles.title}> |
||||
Welcome to <a href="https://nextjs.org">Next.js!</a> |
||||
</h1> |
||||
|
||||
<p className={styles.description}> |
||||
Get started by editing{" "} |
||||
<code className={styles.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/master/examples" |
||||
className={styles.card} |
||||
> |
||||
<h3>Examples →</h3> |
||||
<p>Discover and deploy boilerplate example Next.js projects.</p> |
||||
</a> |
||||
|
||||
<a |
||||
href="https://vercel.com/new?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 className={styles.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 Logo" className={styles.logo} /> |
||||
</a> |
||||
</footer> |
||||
</div> |
||||
); |
||||
}; |
||||
|
||||
export default Home; |
@ -0,0 +1,7 @@ |
||||
// postcss.config.js
|
||||
module.exports = { |
||||
plugins: { |
||||
tailwindcss: {}, |
||||
autoprefixer: {}, |
||||
}, |
||||
}; |
@ -0,0 +1,19 @@ |
||||
module.exports = { |
||||
extends: ["stylelint-config-standard"], |
||||
rules: { |
||||
"at-rule-no-unknown": [ |
||||
true, |
||||
{ |
||||
ignoreAtRules: [ |
||||
"tailwind", |
||||
"apply", |
||||
"variants", |
||||
"responsive", |
||||
"screen", |
||||
], |
||||
}, |
||||
], |
||||
"declaration-block-trailing-semicolon": null, |
||||
"no-descending-specificity": null, |
||||
}, |
||||
}; |
@ -1,16 +1,4 @@ |
||||
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; |
||||
} |
||||
|
||||
a { |
||||
color: inherit; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
* { |
||||
box-sizing: border-box; |
||||
} |
||||
/* ./your-css-folder/styles.css */ |
||||
@tailwind base; |
||||
@tailwind components; |
||||
@tailwind utilities; |
||||
|
@ -0,0 +1,21 @@ |
||||
module.exports = { |
||||
purge: { |
||||
content: [ |
||||
"./pages/**/*.{js,ts,jsx,tsx}", |
||||
"./components/**/*.{js,ts,jsx,tsx}", |
||||
], |
||||
// These options are passed through directly to PurgeCSS
|
||||
options: { |
||||
keyframes: true, |
||||
fontFace: true, |
||||
}, |
||||
}, |
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: { |
||||
extend: {}, |
||||
}, |
||||
variants: { |
||||
extend: {}, |
||||
}, |
||||
plugins: [], |
||||
}; |
@ -0,0 +1,23 @@ |
||||
{ |
||||
"compilerOptions": { |
||||
/* Basic Options */ |
||||
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, |
||||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, |
||||
"allowJs": false /* Allow javascript files to be compiled. */, |
||||
"resolveJsonModule": true, |
||||
"jsx": "preserve" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */, |
||||
"baseUrl": ".", |
||||
/* Strict Type-Checking Options */ |
||||
"strict": true /* Enable all strict type-checking options. */, |
||||
"strictNullChecks": true /* Enable strict null checks. */, |
||||
"skipLibCheck": true, |
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, |
||||
"lib": ["dom", "dom.iterable", "esnext"], |
||||
"forceConsistentCasingInFileNames": true, |
||||
"noEmit": true, |
||||
"moduleResolution": "node", |
||||
"isolatedModules": true |
||||
}, |
||||
"exclude": ["node_modules", "public", ".cache", ".vscode", ".next"], |
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] |
||||
} |
Loading…
Reference in new issue