Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
NadunSanjeevana committed Sep 12, 2023
1 parent d667f21 commit af74c40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/layouts/authentication/sign-in/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function Basic() {
const { login } = useUser();
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [role, setRole] = useState("user");

const [rememberMe, setRememberMe] = useState(false);

Expand Down Expand Up @@ -123,11 +124,12 @@ function Basic() {
if (data && data.user) {
// Display a success message if applicable
const userData = data.user;
setRole(userData.role);
console.log(userData);
login({
name: userData.User_Name,
full_name: userData.Full_Name,
role: "user",
role: role,
email: userData.email,
phone_Number: userData.Contact_Number,
profession: userData.Profession,
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function Dashboard() {
color="success"
icon="store"
title="Reports"
count="34k"
count={counts.report_count}
percentage={{
color: "success",
amount: "+1%",
Expand Down

0 comments on commit af74c40

Please sign in to comment.