From 6fd24189446386b5df8846a35fd108a91c7257a5 Mon Sep 17 00:00:00 2001 From: Stanisław Zagórowski Date: Mon, 6 Nov 2023 15:37:42 +0100 Subject: change typing on timeLoop --- front/src/components/animated_bg.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/components/animated_bg.tsx b/front/src/components/animated_bg.tsx index 80a8a63..b5fdbb0 100644 --- a/front/src/components/animated_bg.tsx +++ b/front/src/components/animated_bg.tsx @@ -1,6 +1,6 @@ import { Shaders, Node, GLSL } from "gl-react"; import { Surface } from "gl-react-dom"; -import React from "preact/compat"; +import React, { FunctionComponent } from "preact/compat"; import { PropsWithChildren } from "preact/compat"; const shaders = Shaders.create({ @@ -88,7 +88,7 @@ const AnimatedBgInternal = ({ tick }: { tick: number }) => { // // accepts a JSX component as an argument const timeLoop = ( - C: (props: PropsWithChildren<{ tick: number }>) => React.JSX.Element, + C: FunctionComponent>, { refreshRate }: { refreshRate: number } ) => { return class TimeLoop extends React.Component { -- cgit v1.3.1