Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up the project structure #2

Merged
merged 12 commits into from
Mar 20, 2022
Prev Previous commit
Next Next commit
chore(web): reorganize the structure of the frontend project
  • Loading branch information
tericcabrel committed Mar 20, 2022
commit 66efaf1b551564aea643db84de7a5ceda388689b
2 changes: 1 addition & 1 deletion apps/web/pages/_app.tsx → apps/web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../styles/globals.css';
import '@/styles/globals.css';
import type { AppProps } from 'next/app';

function MyApp({ Component, pageProps }: AppProps) {
Expand Down
File renamed without changes.
27 changes: 13 additions & 14 deletions apps/web/pages/index.tsx → apps/web/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,57 +1,56 @@
import type { NextPage } from 'next';
import Head from 'next/head';
import Image from 'next/image';
import styles from '../styles/Home.module.css';

const Home: NextPage = () => {
return (
<div className={styles.container}>
<div className="container">
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<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>
<main className="main">
<h1 className="title">
Welcome to <a href="https://nextjs.org">Sharingan</a>
</h1>

<p className={styles.description}>
Get started by editing <code className={styles.code}>pages/index.tsx</code>
<p className="description">
Get started by editing <code className="code">pages/index.tsx</code>
</p>

<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<div className="grid">
<a href="https://nextjs.org/docs" className="card">
<h2>Documentation &rarr;</h2>
<p>Find in-depth information about Next.js features and API.</p>
</a>

<a href="https://nextjs.org/learn" className={styles.card}>
<a href="https://nextjs.org/learn" className="card">
<h2>Learn &rarr;</h2>
<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}>
<a href="https://github.com/vercel/next.js/tree/canary/examples" className="card">
<h2>Examples &rarr;</h2>
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>

<a href="https://vercel.com/new" className={styles.card}>
<a href="https://vercel.com/new" className="card">
<h2>Deploy &rarr;</h2>
<p>Instantly deploy your Next.js site to a public URL with Vercel.</p>
</a>
</div>
</main>

<footer className={styles.footer}>
<footer className="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{' '}
<span className={styles.logo}>
<span className="logo">
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}

a {
Expand Down
3 changes: 3 additions & 0 deletions apps/web/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "base.css";
@import "home.css";

File renamed without changes.
7 changes: 6 additions & 1 deletion apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"incremental": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/public/*": ["./public/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down