Skip to content

Commit

Permalink
performance: compressed background image to reduce loadtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristoGrab committed Jun 15, 2023
1 parent d099781 commit 1a3a3a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified public/night-sky.webp
Binary file not shown.
6 changes: 4 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ import Viewport from './components/Viewport';
import InfoCard from "./components/InfoCard";
import SolarSystem from "./components/SolarSystem";
import LoadingScreen from "./components/LoadingScreen";
import { useState } from "react";
import { useState, useEffect } from "react";
import "./index.css";

function App() {

const [appLoaded, setAppLoaded] = useState(false);


useEffect(() => {
setTimeout(() => {
setAppLoaded(true);
}, 3000);
}, []);

if (!appLoaded) {
return (
Expand Down

0 comments on commit 1a3a3a0

Please sign in to comment.