1- import { Box , Typography , Button , Container } from "@mui/material" ;
1+ import { Box , Typography , Button , Container , Grid } from "@mui/material" ;
2+ import { Colors } from "design/theme" ;
23import { useAppDispatch } from "hooks/useAppDispatch" ;
34import { useAppSelector } from "hooks/useAppSelector" ;
45import NeuroJsonGraph from "modules/universe/NeuroJsonGraph" ;
56import React , { useEffect } from "react" ;
7+ import { useNavigate } from "react-router-dom" ;
68import { fetchRegistry } from "redux/neurojson/neurojson.action" ;
79import { NeurojsonSelector } from "redux/neurojson/neurojson.selector" ;
810
911const Home : React . FC = ( ) => {
12+ const navigate = useNavigate ( ) ;
1013 const dispatch = useAppDispatch ( ) ;
1114 const { registry } = useAppSelector ( NeurojsonSelector ) ;
1215
@@ -15,12 +18,73 @@ const Home: React.FC = () => {
1518 } , [ dispatch ] ) ;
1619
1720 return (
18- < Container style = { { width : "100%" , height : "100vh" , padding : 0 } } >
19- { registry && registry . length > 0 ? (
20- < NeuroJsonGraph registry = { registry } />
21- ) : (
22- < div > No data available to display</ div >
23- ) }
21+ < Container
22+ style = { {
23+ minWidth : "100%" ,
24+ height : "100vh" ,
25+ padding : 0 ,
26+ overflow : "hidden" ,
27+ position : "relative" ,
28+ } }
29+ >
30+ < Box
31+ sx = { {
32+ zIndex : "2" ,
33+ position : "relative" ,
34+ width : "100%" ,
35+ overflow : "hidden" ,
36+ } }
37+ >
38+ { registry && registry . length > 0 ? (
39+ < NeuroJsonGraph registry = { registry } />
40+ ) : (
41+ < div > No data available to display</ div >
42+ ) }
43+ </ Box >
44+
45+ < Box
46+ sx = { {
47+ maxWidth : "42%" ,
48+ zIndex : "3" ,
49+ position : "absolute" ,
50+ top : "10%" ,
51+ left : "5%" ,
52+ backgroundColor : "rgba(255, 255, 255, 0.8)" ,
53+ padding : "1.5rem" ,
54+ borderRadius : "8px" ,
55+ boxShadow : "0 4px 8px rgba(0, 0, 0, 0.1)" ,
56+ } }
57+ >
58+ { /* Header Section */ }
59+ < Typography
60+ variant = "h3"
61+ gutterBottom
62+ sx = { { color : Colors . primary . dark } }
63+ >
64+ Discover NeuroJSON IO
65+ </ Typography >
66+ < Typography variant = "body1" sx = { { color : Colors . textSecondary } } >
67+ Efficiently manage and explore your CouchDB databases and datasets
68+ with ease.
69+ </ Typography >
70+
71+ { /* Navigation to Database Page */ }
72+ < Box mt = { 4 } >
73+ < Button
74+ variant = "contained"
75+ sx = { {
76+ backgroundColor : Colors . primary . main ,
77+ color : Colors . white ,
78+ "&:hover" : {
79+ backgroundColor : Colors . primary . dark ,
80+ } ,
81+ } }
82+ onClick = { ( ) => navigate ( "/databases" ) }
83+ >
84+ View Databases
85+ </ Button >
86+ </ Box >
87+ </ Box >
2488 </ Container >
2589 ) ;
2690} ;
0 commit comments