File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff 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 ) => {
You can’t perform that action at this time.
0 commit comments