-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π admin profile made dynamic using localstorage (#865)
* admin profile made dynamic successfully * admin functionality made dynamic --------- Co-authored-by: Mandar007007 <[email protected]>
- Loading branch information
1 parent
ba0684a
commit 1e6fd02
Showing
4 changed files
with
18 additions
and
4 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
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,14 +1,20 @@ | ||
import React, { useState } from "react"; | ||
import React, { useEffect, useState } from "react"; | ||
import EditIcon from "@material-ui/icons/Edit"; | ||
import CloseIcon from "@material-ui/icons/Close"; | ||
import style from "./profile.module.scss"; | ||
|
||
export function Profile() { | ||
const [name, setName] = useState("Super Admin Name"); | ||
const [email, setEmail] = useState("[email protected]"); | ||
const [phone, setPhone] = useState("+91-1234567891"); | ||
const [phone, setPhone] = useState("+91-123456789"); | ||
const [edit, setEdit] = useState(false); | ||
|
||
useEffect(() => { | ||
setName(localStorage.getItem("firstName")); | ||
setEmail(localStorage.getItem("email")); | ||
setPhone(localStorage.getItem("phone")); | ||
},[setName,setEmail,setPhone]) | ||
|
||
return ( | ||
<div className={style["profile-container"]}> | ||
<h1>My Profile</h1> | ||
|
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