Spaces:
Sleeping
Sleeping
Download static/app.jsx from Tabatha-625/ChatAI: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/spaces/Tabatha-625/ChatAI/resolve/main/static/app.jsx
- Command line
-
hf download hf://spaces/Tabatha-625/ChatAI/static/app.jsx
-
curl -L -o app.jsx https://huggingface.co/spaces/Tabatha-625/ChatAI/resolve/main/static/app.jsx
472 Bytes
| function App() { | |
| const [session, setSession] = React.useState(null); | |
| const [loading, setLoading] = React.useState(true); | |
| React.useEffect(() => { | |
| supabase.auth.getSession().then(({ data }) => { | |
| setSession(data.session); | |
| setLoading(false); | |
| }); | |
| supabase.auth.onAuthStateChange((_event, session) => { | |
| setSession(session); | |
| }); | |
| }, []); | |
| if (loading) return null; | |
| if (!session) { | |
| return <Login />; | |
| } | |
| return <ChatUI />; | |
| } | |