🐛 FIX: /users à la place de /profile

This commit is contained in:
Divlo 2020-04-23 17:53:39 +02:00
parent cb6233843a
commit 699ce6ec36
2 changed files with 1 additions and 17 deletions

View File

@ -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;

View File

@ -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 } />;
}