···3838import { isIOS, useViewportSize } from "@react-aria/utils";
3939import { onMouseDown } from "src/utils/iosInputMouseDown";
4040import { HoverButton } from "components/Buttons";
4141+import { useInitialPageLoad } from "components/InitialPageLoadProvider";
41424243export type pickers =
4344 | "null"
···6566}
6667export const ThemePopover = (props: { entityID: string; home?: boolean }) => {
6768 let { rep } = useReplicache();
6969+ let pageLoaded = useInitialPageLoad();
6870 // I need to get these variables from replicache and then write them to the DB. I also need to parse them into a state that can be used here.
6971 let leafletValue = useColorAttribute(props.entityID, "theme/page-background");
7072 let pageValue = useColorAttribute(props.entityID, "theme/card-background");
···9799 let randomPositions = useMemo(() => {
98100 let values = [] as string[];
99101 for (let i = 0; i < 3; i++) {
100100- values.push(
101101- `${Math.floor(Math.random() * 100)}% ${Math.floor(Math.random() * 100)}%`,
102102- );
102102+ if (!pageLoaded) values.push(`100% 100%`);
103103+ else
104104+ values.push(
105105+ `${Math.floor(Math.random() * 100)}% ${Math.floor(Math.random() * 100)}%`,
106106+ );
103107 }
104108 return values;
105105- }, []);
109109+ }, [pageLoaded]);
106110107111 let gradient = [
108112 `radial-gradient(at ${randomPositions[0]}, ${accent1Value.toString("hex")}80 2px, transparent 70%)`,