Commit 753429a6 authored by Choi Ga Young's avatar Choi Ga Young
Browse files

Merge remote-tracking branch 'origin/kimpen' into rkyoung7

parents fabdb9ce ec8a3d0b
......@@ -6,7 +6,7 @@
## 개발일지
- 추후 공개
- https://rkyoung7.notion.site/KU-948e5a638dc842bb91ad8376f51322e2
2021 스마트 APP 개발 공모전
......
......@@ -2,14 +2,14 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/calender-icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/calender-icon.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
......@@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>오늘의 KU</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
......
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import HomePage from "./pages/HomePage";
import SchedulePage from "./pages/SchedulePage";
import ScheduleEditPage from "./pages/ScheduleEditPage";
import AdminPage from "./pages/AdminPage";
import PrivateRoute from "./components/PrivateRoute";
import Err from "./pages/ErrorPage";
function App() {
return (
<>
</>
<Router basename={process.env.PUBLIC_URL}>
<Switch>
<Route path="/" component={Err} />
<Route path="/home" component={HomePage} />
<Route path="/schedule/edit" component={ScheduleEditPage} />
<Route path="/schedule" component={SchedulePage} />
<PrivateRoute path="/admin" component={AdminPage} role="admin" />
</Switch>
</Router>
);
}
export default App;
export default App;
\ No newline at end of file
const Menu = () => {
return (
<></>
)
}
export default Menu
\ No newline at end of file
import { Redirect, Route } from "react-router-dom";
// import { useAuth } from "../context/auth_context";
import ErrorPage from "../pages/ErrorPage";
const PrivateRoute = ({ component, ...rest }) => {
// const { user } = useAuth();
// return (
// <Route
// {...rest}
// render={(props) => {
// if (user) {
// if (rest.role) {
// if (rest.role === user.role) {
// return <Component {...props} />;
// } else {
// return <ErrorPage />
// }
// } else {
// return <Component {...props} />
// }
// } else {
// return <Redirect to="/login" />;
// }
// }}
// />
// );
};
export default PrivateRoute;
\ No newline at end of file
const ScheduleForm = () => {
return (
<></>
)
}
export default ScheduleForm
\ No newline at end of file
const AdminPage = () => {
return (
<></>
)
}
export default AdminPage
\ No newline at end of file
const ErrorPage = () => {
return (
<div className="bg-white " id="notfound">
<div className="notfound" style={{ backgroundImage: `url(/ku-tiger.png)`, backgroundSize: "cover" }}>
<div className="notfound-404"></div>
<h1>404</h1>
<h2>Oops! Page Not Be Found</h2>
<p>Sorry but the page you are looking for does not exist, have been removed. name changed or is temporarily unavailable</p>
<a href="/">Back to homepage</a>
</div>
</div>
)
}
export default ErrorPage
\ No newline at end of file
const HomePage = () => {
return (
<></>
)
}
export default HomePage
\ No newline at end of file
const ScheduleEditPage = () => {
return (
<></>
)
}
export default ScheduleEditPage
\ No newline at end of file
const SchedulePage = () => {
return (
<></>
)
}
export default SchedulePage
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment