diff --git a/src/components/TscircuitIframe.tsx b/src/components/TscircuitIframe.tsx index 2de9d6a0..f3e29a38 100644 --- a/src/components/TscircuitIframe.tsx +++ b/src/components/TscircuitIframe.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef } from "react" +import { useEffect, useRef, useState } from "react" export interface TscircuitIframeProps { fsMap?: Record @@ -8,6 +8,7 @@ export interface TscircuitIframeProps { export const TscircuitIframe = (runFrameProps: TscircuitIframeProps) => { const iframeRef = useRef(null) + const [isLoading, setIsLoading] = useState(true) let additionalProps = {} @@ -29,6 +30,7 @@ export const TscircuitIframe = (runFrameProps: TscircuitIframeProps) => { }, "*", ) + setIsLoading(false) } } @@ -38,6 +40,14 @@ export const TscircuitIframe = (runFrameProps: TscircuitIframeProps) => { return (
+ {isLoading && ( +
+
+
+
+
+
+ )}