From 83f4b7fd24acabf61075b8a582671f54500a7670 Mon Sep 17 00:00:00 2001 From: Murilo Cunha Date: Fri, 5 Jan 2024 17:42:52 +0100 Subject: [PATCH] transmpile --- .web/pages/events.js | 96 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .web/pages/events.js diff --git a/.web/pages/events.js b/.web/pages/events.js new file mode 100644 index 0000000..8374dd5 --- /dev/null +++ b/.web/pages/events.js @@ -0,0 +1,96 @@ +import {useEffect, useState} from "react" +import {useRouter} from "next/router" +import {E, updateState} from "/utils/state" +import "focus-visible/dist/focus-visible" +import {Box, Center, HStack, Heading, Image, Link, Text, VStack} from "@chakra-ui/react" +import NextLink from "next/link" +import NextHead from "next/head" + +const EVENT = "http://localhost:8000/event" +export default function Component() { +const [state, setState] = useState({"events": [{"name": "state.hydrate"}]}) +const [result, setResult] = useState({"state": null, "events": [], "processing": false}) +const router = useRouter() +const Event = events => setState({ + ...state, + events: [...state.events, ...events], +}) +useEffect(() => { + const update = async () => { + if (result.state != null) { + setState({ + ...result.state, + events: [...state.events, ...result.events], + }) + setResult({ + state: null, + events: [], + processing: false, + }) + } + await updateState(state, result, setResult, EVENT, router) + } + update() +}) +return ( + + + + + + + + +{`Python UG BE`} + + + + + + + + + + + +
+ + +{`Python User Group `} + +{`Belgium`} + + +{`Check out our events!`}
+ +
+ +{`Made with ❤️, powered by`} + +{`+`} +
+ +{`Events`} + +
+) +} \ No newline at end of file