-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from mdjahidhasan009/frontend-redesign
Frontend redesign
- Loading branch information
Showing
49 changed files
with
24,286 additions
and
23,501 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
REACT_APP_BACKEND_URL=http://localhost:5000/api | ||
REACT_APP_ASSET_URL=http://localhost:5000 | ||
REACT_APP_BACKEND_URL=https://project-tracker-gray.vercel.app/api/ | ||
REACT_APP_ASSET_URL=https://project-tracker-gray.vercel.app |
Large diffs are not rendered by default.
Oops, something went wrong.
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,65 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
<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" /> | ||
<!-- | ||
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/ | ||
--> | ||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
<!-- | ||
Notice the use of %PUBLIC_URL% in the tags above. | ||
It will be replaced with the URL of the `public` folder during the build. | ||
Only files inside the `public` folder can be referenced from the HTML. | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta | ||
name="description" | ||
content="Web site created using create-react-app" | ||
/> | ||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.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/ | ||
--> | ||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
<!-- | ||
Notice the use of %PUBLIC_URL% in the tags above. | ||
It will be replaced with the URL of the `public` folder during the build. | ||
Only files inside the `public` folder can be referenced from the HTML. | ||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | ||
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`. | ||
--> | ||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | ||
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`. | ||
--> | ||
|
||
<!-- CSS --> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | ||
<!-- <link href="css/materialize_1.0.0.css" rel="stylesheet"/>--> | ||
<!-- CSS --> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> --> | ||
<!-- Remove or comment out the Materialize CSS link above --> | ||
|
||
<script src="https://kit.fontawesome.com/ce6a256b4b.js" crossorigin="anonymous"></script> | ||
<!-- <link href="css/style.css" rel="stylesheet"/>--> | ||
<title>Project Tracker</title> | ||
</head> | ||
<body style="background-color: #e1f5f7"> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
<script src="https://kit.fontawesome.com/ce6a256b4b.js" crossorigin="anonymous"></script> | ||
<!-- <link href="css/style.css" rel="stylesheet"/> --> | ||
<title>Project Tracker</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
|
||
You can add webfonts, meta tags, or analytics to this file. | ||
The build step will place the bundled scripts into the <body> tag. | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
To begin the development, run `npm start` or `yarn start`. | ||
To create a production bundle, use `npm run build` or `yarn build`. | ||
--> | ||
You can add webfonts, meta tags, or analytics to this file. | ||
The build step will place the bundled scripts into the <body> tag. | ||
<!-- Scripts--> | ||
<!-- <script src="jquery/jquery_3.5.1.js"></sczript>--> | ||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | ||
<!-- <script src="javascript/materialize_1.0.0.js"></script>--> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> | ||
<script> | ||
$(document).ready(function(){ | ||
$('.sidenav').sidenav(); | ||
$('.modal').modal(); | ||
// $('select').formSelect(); | ||
}); | ||
</script> | ||
To begin the development, run `npm start` or `yarn start`. | ||
To create a production bundle, use `npm run build` or `yarn build`. | ||
--> | ||
|
||
</body> | ||
<!-- Scripts --> | ||
<!--<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>--> | ||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> --> | ||
<!-- Remove or comment out the Materialize JavaScript link above --> | ||
<!--<script>--> | ||
<!-- $(document).ready(function(){--> | ||
<!-- $('.sidenav').sidenav();--> | ||
<!-- $('.modal').modal();--> | ||
<!-- // $('select').formSelect();--> | ||
<!-- });--> | ||
<!--</script>--> | ||
</body> | ||
</html> |
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,36 +1,45 @@ | ||
import React, { Fragment, useEffect } from 'react'; | ||
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | ||
import { BrowserRouter as Router, Route, Switch, NavLink, Redirect } from 'react-router-dom'; | ||
import { Provider } from 'react-redux'; | ||
|
||
import store from './store'; | ||
import { loadUser } from "./actions/auth-action"; | ||
import { useHttpClient } from "./hooks/http-hook"; | ||
|
||
import Navbar from './components/shared/nav/nav'; | ||
import Auth from './screens/auth/authScreen'; | ||
import Routes from "./routing/Routes"; | ||
import { loadUser } from './actions/auth-action'; | ||
import { useHttpClient } from './hooks/http-hook'; | ||
import HomeScreen from './screens/HomeScreen'; | ||
import Routes from './routing/Routes'; | ||
import NotFoundScreen from './screens/NotFoundScreen'; | ||
import Login from "./screens/auth/Login"; | ||
import Navbar from "./components/shared/nav/nav"; | ||
|
||
const App = () => { | ||
const { sendRequest } = useHttpClient(); | ||
const hideNavbarRoutes = ["/", "/login", "*"]; | ||
const displayNavbar = <Navbar> | ||
<Switch> | ||
<Route exact component={Routes} /> | ||
</Switch> | ||
</Navbar> | ||
|
||
useEffect(() => { | ||
store.dispatch(loadUser(sendRequest));//as till now store is not fully operational | ||
// eslint-disable-next-line | ||
store.dispatch(loadUser(sendRequest)); | ||
}, []); | ||
|
||
return ( | ||
<Provider store={store}> | ||
<Router> | ||
<Fragment> | ||
<Navbar /> | ||
<Route | ||
render={({ location }) => ( | ||
!hideNavbarRoutes?.includes(location.pathname) && displayNavbar | ||
)} | ||
/> | ||
<Switch> | ||
<Route exact path="/" component={ Auth } /> | ||
<Route exact component= { Routes } /> | ||
<Route exact path="/" component={HomeScreen} /> | ||
<Route exact path="/login" component={Login} /> | ||
</Switch> | ||
</Fragment> | ||
</Router> | ||
</Provider> | ||
); | ||
} | ||
}; | ||
|
||
export default 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,24 @@ | ||
import {useEffect, useRef} from "react"; | ||
import lottie from 'lottie-web'; | ||
|
||
const LottieAnimation = ({ animationData }) => { | ||
const containerRef = useRef(null); | ||
|
||
useEffect(() => { | ||
const animation = lottie.loadAnimation({ | ||
container: containerRef.current, | ||
renderer: 'svg', | ||
loop: true, | ||
autoplay: true, | ||
animationData: animationData, // Your JSON animation data | ||
}); | ||
|
||
return () => { | ||
animation.destroy(); | ||
}; | ||
}, [animationData]); | ||
|
||
return <div ref={containerRef} />; | ||
}; | ||
|
||
export default LottieAnimation; |
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
Oops, something went wrong.