Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
deleter
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim committed Jun 26, 2023
1 parent 2bc028e commit e8f92d1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,4 @@ function AuthProvider({ children }: { children: React.ReactNode }) {

export function useAuth() {
return useContext(AuthContext)
}

function RequireAuth({ children }: { children: JSX.Element }) {
let auth = useAuth()
let location = useLocation()

if (!auth.walletAddress) {
// Redirect them to the /login page, but save the current location they were
// trying to go to when they were redirected. This allows us to send them
// along to that page after they login, which is a nicer user experience
// than dropping them off on the home page.
return <Navigate to={routesPath.HOME} state={{ from: location }} replace />
}

return children
}
}
Binary file removed src/assets/img/test_2.gif
Binary file not shown.

0 comments on commit e8f92d1

Please sign in to comment.