Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/bounswe/2021SpringGr…
Browse files Browse the repository at this point in the history
…oup2 into backend-authentication
  • Loading branch information
ege-kaya committed Nov 14, 2021
2 parents df3b855 + fc029ae commit 1193696
Show file tree
Hide file tree
Showing 86 changed files with 14,479 additions and 10,355 deletions.
3 changes: 3 additions & 0 deletions frontend/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
10 changes: 10 additions & 0 deletions frontend/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Getting Started</title>
</head>
<body>
<script src="main.js"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions frontend/dist/main.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions frontend/dist/main.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
37 changes: 37 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "webpack-demo",
"version": "1.0.0",
"description": "",
"private": true,
"scripts": {
"dev": "webpack --mode development --entry ./src/index.js --output-path ./static/frontend",
"build": "webpack --mode production --entry ./src/index.js --output-path ./static/frontend",
"start": "webpack serve --config ./webpack.config.js --mode development --open"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
"babel-loader": "^8.2.3",
"html-webpack-plugin": "^5.5.0",
"webpack": "^5.62.1",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.4.0"
},
"dependencies": {
"@babel/preset-react": "^7.16.0",
"@babel/runtime": "^7.16.0",
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@mui/icons-material": "^5.1.0",
"@mui/material": "^5.0.6",
"@mui/styles": "^5.1.0",
"joi": "^17.4.2",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.0.1"
}
}
31 changes: 31 additions & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import {
Route,
Routes,
useHistory
} from "react-router-dom";

import Home from './Views/Home/Index'
import Login from './Views/Login/Index'
import Layout from './Views/Shared/Layout'
import Signup from './Views/Signup/Index'



const App = () => {
console.log("sa")
return (
<React.Fragment>
<Routes>
<Route path="/" element={<Layout />}>
<Route index element={<Home/>}/>
<Route path='login' element={<Login/>}/>
<Route path='signup' element={<Signup/>}/>
<Route path="*" element={<Home />} />
</Route>
</Routes>
</React.Fragment>
)
}

export default App
14 changes: 14 additions & 0 deletions frontend/src/Views/Home/Index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react';
import Button from '@mui/material/Button';

const Home = () => {
return (
<React.Fragment>
<div>
<Button variant="contained">Hello World</Button>
</div>
</React.Fragment>
)
}

export default Home
10 changes: 10 additions & 0 deletions frontend/src/Views/Login/Index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';

const Login = () => {
return (
<React.Fragment>
</React.Fragment>
)
}

export default Login
32 changes: 32 additions & 0 deletions frontend/src/Views/Shared/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import {Outlet, Link, useLocation} from 'react-router-dom'

const Header = () => {

return (
<React.Fragment>
<nav>
<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/about">About</Link>
</li>
<li>
<Link to="/dashboard">Dashboard</Link>
</li>
<li>
<Link to="/signup">Signup</Link>
</li>
<li>
<Link to="/nothing-here">Nothing Here</Link>
</li>
</ul>
</nav>
<hr />
</React.Fragment>
)
}

export default Header
24 changes: 24 additions & 0 deletions frontend/src/Views/Shared/Layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import {Outlet} from 'react-router-dom'
import Header from './Header'
import {createTheme, ThemeProvider} from "@mui/material/styles";



const Layout = () => {
const theme = createTheme();

return (
<React.Fragment>
<ThemeProvider theme={theme}>

<div>
<Header/>
<Outlet />
</div>
</ThemeProvider>
</React.Fragment>
)
}

export default Layout
Loading

0 comments on commit 1193696

Please sign in to comment.