()
| 43 | } |
| 44 | |
| 45 | export function HomeIndex() { |
| 46 | const [width, setWidth] = useState(window.innerWidth); |
| 47 | const [height, setHeight] = useState(window.innerHeight); |
| 48 | const nodeRef = useRef(null); |
| 49 | useEffect(() => { |
| 50 | const handleResize = () => { |
| 51 | setWidth(window.innerWidth); |
| 52 | setHeight(window.innerHeight); |
| 53 | }; |
| 54 | const node = nodeRef.current; |
| 55 | node.addEventListener("click", clickHandler); |
| 56 | window.addEventListener("resize", handleResize); |
| 57 | return () => { |
| 58 | node.removeEventListener("click", clickHandler); |
| 59 | window.removeEventListener("resize", handleResize); |
| 60 | }; |
| 61 | }, []); |
| 62 | return ( |
| 63 | <Box |
| 64 | ref={nodeRef} |
| 65 | sx={{ |
| 66 | bgcolor: (theme) => theme.palette.background.default, |
| 67 | height: "100%", |
| 68 | width: "100%", |
| 69 | display: 'flex', |
| 70 | justifyContent: 'center', |
| 71 | }} |
| 72 | > |
| 73 | {/* full-viewport soft wash — gives the frosted cards smooth tonal |
| 74 | variation to refract. It's fixed so it spans edge to edge instead |
| 75 | of being clipped by the 1700px content cap. */} |
| 76 | <Box aria-hidden sx={{ |
| 77 | position: 'fixed', |
| 78 | top: 60, |
| 79 | left: 0, |
| 80 | right: 0, |
| 81 | bottom: 0, |
| 82 | zIndex: 0, |
| 83 | pointerEvents: 'none', |
| 84 | background: (theme) => theme.palette.mode === 'dark' |
| 85 | ? 'linear-gradient(155deg, #141B26 0%, #0F1318 52%, #12171F 100%)' |
| 86 | : 'linear-gradient(155deg, #EEF4FD 0%, #D8E4F6 48%, #E7ECF6 100%)', |
| 87 | }}/> |
| 88 | <WorldMap width={width} height={height}/> |
| 89 | <HomeIndexContent/> |
| 90 | </Box> |
| 91 | ) |
| 92 | } |
| 93 | |
| 94 | function HomeIndexContent() { |
| 95 | const [pageIndex, setPageIndex] = useState(0); |
nothing calls this directly
no outgoing calls
no test coverage detected