From ed5435f69e9d05eaffff6122e3920dbae28a05d8 Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Sun, 12 Mar 2023 23:23:55 +0100 Subject: [PATCH] YEE 2 --- src/views/developer/TestView.tsx | 90 +------------------------------- 1 file changed, 1 insertion(+), 89 deletions(-) diff --git a/src/views/developer/TestView.tsx b/src/views/developer/TestView.tsx index 744d6bda..8dc1ccdd 100644 --- a/src/views/developer/TestView.tsx +++ b/src/views/developer/TestView.tsx @@ -1,92 +1,4 @@ -import { Button } from "@/components/Button"; -import { FloatingAnchor } from "@/components/popout/FloatingAnchor"; -import { - FloatingCardView, - PopoutFloatingCard, -} from "@/components/popout/FloatingCard"; -import { FloatingContainer } from "@/components/popout/FloatingContainer"; -import { FloatingView } from "@/components/popout/FloatingView"; -import { useFloatingRouter } from "@/hooks/useFloatingRouter"; -import { useEffect, useRef, useState } from "react"; - // simple empty view, perfect for putting in tests export function TestView() { - const [show, setShow] = useState(false); - const { pageProps, navigate } = useFloatingRouter(); - const [left, setLeft] = useState(600); - const direction = useRef(1); - - useEffect(() => { - const step = 0; - const interval = setInterval(() => { - setLeft((v) => { - const newVal = v + direction.current * step; - if (newVal > window.innerWidth || newVal < 0) { - direction.current *= -1; - } - return v + direction.current * step; - }); - }, 10); - - return () => { - clearInterval(interval); - }; - }, []); - - return ( -
- setShow(false)}> - setShow(false)}> - - setShow(false)} - close - action={Do something} - /> - -

Hello world

- -
-
- - navigate("/")} - action={Do something} - /> - -

Hello world

-

navigate("/second")}>Click to go brrr

- - -
-
- - - -
-
-
- -
setShow((v) => !v)} - /> - -
-
- ); + return
; }