From 699ce6ec36d7713634c989eb0db86b46e7fc9b32 Mon Sep 17 00:00:00 2001 From: Divlo Date: Thu, 23 Apr 2020 17:53:39 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20FIX:=20/users=20=C3=A0=20la=20pl?= =?UTF-8?q?ace=20de=20/profile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/contexts/FunctionTabsContext.js | 16 ---------------- website/hoc/withoutAuth.js | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 website/contexts/FunctionTabsContext.js diff --git a/website/contexts/FunctionTabsContext.js b/website/contexts/FunctionTabsContext.js deleted file mode 100644 index f080886..0000000 --- a/website/contexts/FunctionTabsContext.js +++ /dev/null @@ -1,16 +0,0 @@ -import React, { createContext, useState } from 'react'; - -export const FunctionTabsContext = createContext(); - -function FunctionTabsContextProvider(props) { - - const [slideIndex, setSlideIndex] = useState(0); - - return ( - - {props.children} - - ); -} - -export default FunctionTabsContextProvider; \ No newline at end of file diff --git a/website/hoc/withoutAuth.js b/website/hoc/withoutAuth.js index 42d8125..c1ca0b0 100644 --- a/website/hoc/withoutAuth.js +++ b/website/hoc/withoutAuth.js @@ -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 ; }