Skip to content

Commit

Permalink
icon added
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxshan2000 committed Oct 12, 2023
1 parent 386ae08 commit 9bc903b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
Binary file added webapp/src/assets/images/icon-out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webapp/src/assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions webapp/src/components/OffCanvasNavComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Profile from '../assets/images/profile-sample.png'
import { useDeviceWidth } from '../context/DeviceWidthContext'
import { Link } from 'react-router-dom';

import icon from '../assets/images/icon.png'

function OffCanvasNavComponent({collapsed}) {
const isSmall = useDeviceWidth()

Expand All @@ -13,11 +15,12 @@ function OffCanvasNavComponent({collapsed}) {
return (
<div style={{width:isSmall ? `${collapsed? '100%': '0'}` : `${collapsed? 200: 0}px`, overflowX:'hidden', transition: `width ${isSmall? '100ms' :'200ms'} linear`}} className="d-flex flex-column flex-shrink-0 vh-100 m-0">
<div className=''>
<a href="/" className=" text-center d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
<i style={{fontSize:"10em"}} class="bi w-100 bi-person-circle"/>
</a>
<Link to="/dashboard" className=" pt-2 text-center d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
{/* <i style={{fontSize:"10em"}} class="bi w-100 bi-person-circle"/> */}
<img src={icon} width="200px"/>
</Link>
</div>
<h6 className=" text-center">DriveSmart</h6>

<hr/>
<ul className="nav nav-pills flex-column mb-auto">
<span className=' text-info' >MAIN MENU</span>
Expand Down
9 changes: 8 additions & 1 deletion webapp/src/views/Login.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import FloatingLabel from 'react-bootstrap/FloatingLabel';
import Form from 'react-bootstrap/Form';
import '../assets/CSS/signUp.css'
Expand All @@ -17,6 +17,13 @@ export default function Login() {
const [email,setEmail] = useState("")
const [password,setPassword] = useState("")


useEffect(()=>{
if(getSessionCookie("token")){
navigate("/dashboard", {replace:true})
}
})




Expand Down

0 comments on commit 9bc903b

Please sign in to comment.