feat: list streams and story-mode catchup
This commit is contained in:
+13
-4
@@ -1,7 +1,9 @@
|
||||
import { useEffect } from "react";
|
||||
import { HashRouter, Routes, Route } from "react-router-dom";
|
||||
import { useAuthStore } from "@/stores/auth-store";
|
||||
import { LoginPage } from "@/features/auth/login-page";
|
||||
import { HomePage } from "@/pages/home-page";
|
||||
import { StreamsPage } from "@/pages/streams-page";
|
||||
import { StreamPlayerPage } from "@/pages/stream-player-page";
|
||||
|
||||
const App = () => {
|
||||
const status = useAuthStore((s) => s.status);
|
||||
@@ -19,11 +21,18 @@ const App = () => {
|
||||
);
|
||||
}
|
||||
|
||||
if (status === "authenticated") {
|
||||
return <HomePage />;
|
||||
if (status !== "authenticated") {
|
||||
return <LoginPage />;
|
||||
}
|
||||
|
||||
return <LoginPage />;
|
||||
return (
|
||||
<HashRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<StreamsPage />} />
|
||||
<Route path="/streams/:streamId" element={<StreamPlayerPage />} />
|
||||
</Routes>
|
||||
</HashRouter>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user