Skip to content

Commit daafc0d

Browse files
add require auth to profile
1 parent 30759af commit daafc0d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Components/Profile/UserProfile/VisitProfile.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getOptions } from "../../../options"
77
import ProfileHeaderDetails from "./ProfileHeader/ProfileHeadeDetails"
88
import ProfileHeader from "./ProfileHeader/ProfileHeader"
99
import ReactLoading from 'react-loading';
10+
import RequireAuth from "../../../Protected/RequireAuth"
1011

1112

1213
function VisitProfile() {
@@ -26,7 +27,8 @@ function VisitProfile() {
2627
},[userId,user])
2728
if(currentUser){
2829
return (
29-
<div className=" mx-auto w-[496px]">
30+
31+
<RequireAuth> <div className=" mx-auto w-[496px]">
3032
{!loading ? <div className="w-full ">
3133
<ProfileHeader user={currentUser}/>
3234
<ProfileHeaderDetails visit={true} user={currentUser}/>
@@ -37,7 +39,8 @@ function VisitProfile() {
3739
height={40}
3840
width={40}
3941
/></div>}
40-
</div>
42+
</div></RequireAuth>
43+
4144
)
4245
}}
4346

0 commit comments

Comments
 (0)