-
Notifications
You must be signed in to change notification settings - Fork 7
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
React boilerplate #123
Open
hhartwell
wants to merge
23
commits into
master
Choose a base branch
from
react-test
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
React boilerplate #123
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
918e25f
react frontend
hhartwell 05bd964
update skeleltor.sh
hhartwell 1459b47
bash syntax
hhartwell ec0d92d
fix cross environment scripts
hhartwell 6bd144c
roll node back to 18
hhartwell 73bb331
remove dumb package. fix skeletor script
hhartwell 14d2353
export to static
hhartwell 5ae262d
fix static files
hhartwell e33395e
bump node
hhartwell 165be38
run yarn in builder before generate
hhartwell 8271dfa
fix next config
hhartwell 6ddbf86
conditional yarn install
hhartwell 6482a3a
correct bash syntax
hhartwell ac12551
correct bash syntax
hhartwell 03c48ec
edit node version from skeletor.sh
hhartwell 0a433b9
yarn install in fresh install.sh
hhartwell 1b9d550
bring back node modules
hhartwell 096d8f5
add template dirs to base.py
hhartwell 54c6d20
fix node env in nuxtconfig
hhartwell 1725307
skeletor sh writes django static volumne
hhartwell 6706585
material UI setup
sw00d a239947
editor config update
sw00d 4a4978a
reverted next-auth and cleaned up auth page a tiny bit. more to do
sw00d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:12 | ||
FROM node:NODE_VERSION | ||
|
||
RUN mkdir /app | ||
|
||
|
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
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,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
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,34 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
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,17 @@ | ||
const withPlugins = require('next-with-plugins') | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = withPlugins({ | ||
reactStrictMode: true, | ||
swcMinify: true, | ||
env: { | ||
NEXT_PUBLIC_BACKEND_URL: 'http://localhost:8000' | ||
}, | ||
pageFolder: 'src/pages', | ||
images: { unoptimized: true }, | ||
plugins: [ | ||
'next-stylus' | ||
] | ||
}) | ||
|
||
module.exports = nextConfig |
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,33 @@ | ||
{ | ||
"name": "ckc_project", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"generate": "next build && next export", | ||
"lint": "next lint" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "18.11.9", | ||
"@types/react": "18.0.25", | ||
"@types/react-dom": "18.0.9" | ||
}, | ||
"dependencies": { | ||
"@emotion/react": "^11.10.5", | ||
"@emotion/styled": "^11.10.5", | ||
"@mui/icons-material": "^5.11.0", | ||
"@mui/material": "^5.11.0", | ||
"axios": "1.2.0", | ||
"eslint-config-next": "^13.0.7", | ||
"material-ui": "^0.20.2", | ||
"next": "13.0.5", | ||
"next-stylus": "^0.0.2", | ||
"next-with-plugins": "^0.0.1", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"stylus": "^0.59.0", | ||
"typescript": "4.9.3" | ||
} | ||
} |
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions
37
src/react_frontend/src/components/layout/header/Header.tsx
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,37 @@ | ||
import React, {useMemo} from 'react'; | ||
import Link from 'next/link'; | ||
import Image from "next/image"; | ||
import logo from '../../../assets/images/ckc.png'; | ||
import {AppBar, Toolbar, Typography} from '@mui/material'; | ||
import styles from './header.module.css' | ||
|
||
function Header() { | ||
return ( | ||
<AppBar position="static"> | ||
<Toolbar className="d-flex justify-between"> | ||
<Link href="/"> | ||
<Image src={logo} alt="Logo" className={styles.image} /> | ||
</Link> | ||
<div className="d-flex"> | ||
<Link className={styles.link} href="/"> | ||
Home | ||
</Link> | ||
<Link className={styles.link} href="/"> | ||
Pricing | ||
</Link> | ||
<Link className={styles.link} href="/"> | ||
Projects | ||
</Link> | ||
<Link className={styles.link} href="/"> | ||
Settings | ||
</Link> | ||
<Link className={styles.link} href="/harvey_login"> | ||
Login | ||
</Link> | ||
</div> | ||
</Toolbar> | ||
</AppBar> | ||
); | ||
} | ||
|
||
export default Header; |
11 changes: 11 additions & 0 deletions
11
src/react_frontend/src/components/layout/header/header.module.css
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,11 @@ | ||
.image { | ||
width: 160px; | ||
height: 50px; | ||
} | ||
|
||
.link { | ||
text-decoration: none; | ||
margin-right: 24px; | ||
font-size: 24px; | ||
color: white; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi I added something like this to master, so can prob pull this -- hit
/api/auth/user/
like how it used to work