🐛 FIX: /users à la place de /profile
This commit is contained in:
parent
cb6233843a
commit
699ce6ec36
@ -1,16 +0,0 @@
|
||||
import React, { createContext, useState } from 'react';
|
||||
|
||||
export const FunctionTabsContext = createContext();
|
||||
|
||||
function FunctionTabsContextProvider(props) {
|
||||
|
||||
const [slideIndex, setSlideIndex] = useState(0);
|
||||
|
||||
return (
|
||||
<FunctionTabsContext.Provider value={{ slideIndex, setSlideIndex }}>
|
||||
{props.children}
|
||||
</FunctionTabsContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
export default FunctionTabsContextProvider;
|
@ -8,7 +8,7 @@ const withoutAuth = (WrappedComponent) => {
|
||||
|
||||
const { isAuth, user } = useContext(UserContext);
|
||||
|
||||
if (isAuth) return redirect({}, `/profile/${user.name}`);
|
||||
if (isAuth) return redirect({}, `/users/${user.name}`);
|
||||
|
||||
return <WrappedComponent { ...props } />;
|
||||
}
|
||||
|
Reference in New Issue
Block a user