Skip to content

Commit

Permalink
refactor: use getLocalStorageValue function in userProfile section
Browse files Browse the repository at this point in the history
  • Loading branch information
Prajwalism committed Jul 25, 2024
1 parent 37b2e3f commit ed4676b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/components/common/UserProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import UserAvatar from '@Components/common/UserAvatar';
import { toast } from 'react-toastify';
import { getLocalStorageValue } from '@Utils/getLocalStorageValue';

export default function UserProfile() {
const [toggle, setToggle] = useState(false);
const navigate = useNavigate();

const userProfilex = localStorage.getItem('userprofile');
const userProfile = userProfilex && JSON.parse(userProfilex);
const userProfile = getLocalStorageValue('userprofile');

const settingOptions = [
{
Expand Down

0 comments on commit ed4676b

Please sign in to comment.