Skip to content

Commit f46ec07

Browse files
committed
chore: make isProfile a const
1 parent 4c2ddc2 commit f46ec07

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/ui/views/User/User.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,13 @@ export default function UserProfile(): React.ReactElement {
3232
const [auth, setAuth] = useState<boolean>(true);
3333
const [isLoading, setIsLoading] = useState<boolean>(true);
3434
const [isError, setIsError] = useState<boolean>(false);
35-
const [isProfile, setIsProfile] = useState<boolean>(false);
3635
const [gitAccount, setGitAccount] = useState<string>('');
3736
const navigate = useNavigate();
3837
const { id } = useParams<{ id?: string }>();
3938
const { user: loggedInUser } = useContext(UserContext);
39+
const isProfile = !id;
4040

4141
useEffect(() => {
42-
if (id == null) {
43-
setIsProfile(true);
44-
}
45-
4642
if (id) {
4743
getUser(
4844
setIsLoading,
@@ -55,7 +51,6 @@ export default function UserProfile(): React.ReactElement {
5551
id,
5652
);
5753
} else {
58-
setIsProfile(true);
5954
getUser(
6055
setIsLoading,
6156
(userData: UserData) => {

0 commit comments

Comments
 (0)