🎨 standardJS all files
This commit is contained in:
@ -2,8 +2,8 @@ import { useContext } from 'react'
|
||||
import { UserContext } from '../contexts/UserContext'
|
||||
import redirect from '../utils/redirect'
|
||||
|
||||
const withoutAuth = (WrappedComponent) => {
|
||||
const Component = (props) => {
|
||||
const withoutAuth = WrappedComponent => {
|
||||
const Component = props => {
|
||||
const { isAuth, user } = useContext(UserContext)
|
||||
|
||||
if (isAuth) return redirect({}, `/users/${user.name}`)
|
||||
|
Reference in New Issue
Block a user