Skip to content

Commit

Permalink
fix: minor ui changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalCodes committed Dec 14, 2024
1 parent a333c6d commit 6185dde
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/components/shared/navbar/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const Navbar = () => {
const dispatch = useDispatch();
const isLoggedIn = useSelector((state) => state.user.isLoggedIn);
const user = useSelector(selectUser);
console.log("🚀 ~ Navbar ~ user:", user);

const [windowWidth, setWindowWidth] = useState(window.innerWidth);
const [isNavbarOpen, setIsNavbarOpen] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useProfileCompletion.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const useProfileCompletion = () => {

const [credentials, setCredentials] = useState({
description: "",
coverImage: "",
address: {
line1: "",
line2: "",
Expand All @@ -19,7 +20,6 @@ const useProfileCompletion = () => {
});

const validateForm = async (updatedCredentials) => {
console.log("🚀 ~ validateForm ~ updatedCredentials:", updatedCredentials);
const newErrors = {};

// Check required fields for top-level fields
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const Dashboard = () => {
</div>

{(profileData?.config?.hasCompletedProfile === false ||
showEditModal) && <ProfileCompletion edit={showEditModal} />}
showEditModal === true) && <ProfileCompletion edit={showEditModal} />}
</>
);
};
Expand Down
12 changes: 2 additions & 10 deletions src/pages/profile/Profile.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Cookies from "js-cookie";
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { FiEdit3 } from "react-icons/fi";
import { MdLogout } from "react-icons/md";
import { useDispatch, useSelector } from "react-redux";
Expand All @@ -9,7 +9,7 @@ import "swiper/css/autoplay";
import "swiper/css/navigation";
import "swiper/css/pagination";
import useSWR from "swr";
import { Button, Navbar, ProfileCompletion } from "../../components/shared";
import { Button, Navbar } from "../../components/shared";
import { clubEndpoints } from "../../integrations/ApiEndpoints";
import { resetUserData } from "../../redux/slice/userSlice";
import { Logout } from "../../service/MilanApi";
Expand Down Expand Up @@ -66,14 +66,6 @@ const Profile = () => {
<>
<Navbar />

{showProfileModal && (
<ProfileCompletion
setShowProfileModal={setShowProfileModal}
editProfile={editProfile}
seteditProfile={seteditProfile}
/>
)}

<div className="profile_container">
<div className="profile_parent">
<div className="profile_header">
Expand Down

0 comments on commit 6185dde

Please sign in to comment.