auth and socket connections linear and slow progress but cleaner?

This commit is contained in:
talksik
2022-05-13 06:20:08 -05:00
parent 5eb57726ab
commit fc9efed3e2
9 changed files with 535 additions and 220 deletions
@@ -1,9 +1,11 @@
import React from 'react';
import useAuth from '../../providers/AuthProvider';
import Login from './login/Login';
export default function ProtectedRoute({ children }: { children: React.ReactNode }) {
const { user } = useAuth();
if (user) return;
return <>hey</>;
if (!user) return <Login />;
return <>{children}</>;
}