1- import { Identity , Schema , store , useGraphFramework , useSelector } from '@graphprotocol/hypergraph' ;
2- import { Link , createFileRoute } from '@tanstack/react-router' ;
1+ import { Schema , store , useGraphFramework , useSelector } from '@graphprotocol/hypergraph' ;
2+ import { createFileRoute } from '@tanstack/react-router' ;
33
44import { DevTool } from '@/components/dev-tool' ;
55import { Todos } from '@/components/todos' ;
@@ -15,12 +15,11 @@ function Space() {
1515 const { spaceId } = Route . useParams ( ) ;
1616 const spaces = useSelector ( store , ( state ) => state . context . spaces ) ;
1717 const { subscribeToSpace, inviteToSpace, isLoading } = useGraphFramework ( ) ;
18- const { authenticated } = Identity . useGraphLogin ( ) ;
1918 useEffect ( ( ) => {
20- if ( ! isLoading && authenticated ) {
19+ if ( ! isLoading ) {
2120 subscribeToSpace ( { spaceId } ) ;
2221 }
23- } , [ isLoading , subscribeToSpace , spaceId , authenticated ] ) ;
22+ } , [ isLoading , subscribeToSpace , spaceId ] ) ;
2423
2524 const space = spaces . find ( ( space ) => space . id === spaceId ) ;
2625
@@ -32,17 +31,6 @@ function Space() {
3231 return < div className = "flex justify-center items-center h-screen" > Space not found</ div > ;
3332 }
3433
35- if ( ! authenticated ) {
36- return (
37- < div className = "flex flex-col gap-4 justify-center items-center h-screen" >
38- < h1 className = "text-2xl font-bold" > Not authenticated</ h1 >
39- < Link to = "/login" className = "text-blue-500 hover:text-blue-600 underline" >
40- Go to Login
41- </ Link >
42- </ div >
43- ) ;
44- }
45-
4634 return (
4735 < div className = "flex flex-col gap-4 max-w-screen-sm mx-auto py-8" >
4836 < Schema . SpacesProvider defaultSpace = { space . id } >
0 commit comments