diff --git a/web/src/App.tsx b/web/src/App.tsx index f1f01501..e3a6befe 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,6 +1,6 @@ import { Outlet } from "react-router-dom"; import Footer from "./components/Footer"; -import Home from './screens/HomeScreen'; +import Home from "./screens/HomeScreen"; const App = () => { return ( diff --git a/web/src/components/SomePhotos.tsx b/web/src/components/SomePhotos.tsx index 1492377f..5b2a1782 100644 --- a/web/src/components/SomePhotos.tsx +++ b/web/src/components/SomePhotos.tsx @@ -6,119 +6,118 @@ import { Mapper } from "../utils/Mapper"; import { useState, useEffect } from "react"; function SomePhotos() { - const { - loading: photosLoading, - data: photosData, - error: photosError, - } = useQuery(GET_SOME_PHOTOS); + const { + loading: photosLoading, + data: photosData, + error: photosError, + } = useQuery(GET_SOME_PHOTOS); - const [photos, setPhotos] = useState([]); - const [loading, setLoading] = useState(true); - const [noPhotos, setNoPhotos] = useState(false); + const [photos, setPhotos] = useState([]); + const [loading, setLoading] = useState(true); + const [noPhotos, setNoPhotos] = useState(false); - useEffect(() => { - if (photosData) { - try { - const mappedPhotos = Mapper.mapToSomePhotos(photosData); - setPhotos(mappedPhotos); - setLoading(false); - } catch (error) { - setNoPhotos(true); - } - } - }, [photosData]); + useEffect(() => { + if (photosData) { + try { + const mappedPhotos = Mapper.mapToSomePhotos(photosData); + setPhotos(mappedPhotos); + setLoading(false); + } catch (error) { + setNoPhotos(true); + } + } + }, [photosData]); - useEffect(() => { - if (!photosLoading) { - setLoading(false); - } - }, [photosLoading]); + useEffect(() => { + if (!photosLoading) { + setLoading(false); + } + }, [photosLoading]); - if (photosError) { - return
CMS Offline
; - } + if (photosError) { + return
CMS Offline
; + } - return ( - <> - {loading ? ( - - ) : ( -
-

- Our Upcoming Events! -

-
-
- {noPhotos ? ( -
There are no photos to display
- ) : ( -
- -
- event pic -

- {`${photos[0].title}`} -

-
- -
- event pic -

- {`${photos[0].title}`} -

-
- -
- event pic -

+ return ( + <> + {loading ? ( + + ) : ( +

+

+ Our Upcoming Events! +

+
+
+ {noPhotos ? ( +
There are no photos to display
+ ) : ( +
+
+ event pic +

{`${photos[0].title}`} -

-
- -
- event pic -

- {`${photos[0].title}`} -

-
-
- )} -
-
-
-

- Some Photos! -

+

+
-
- -
-
-
- )} - - ); +
+ event pic +

+ {`${photos[0].title}`} +

+
+ +
+ event pic +

+ {`${photos[0].title}`} +

+
+ +
+ event pic +

+ {`${photos[0].title}`} +

+
+
+ )} +
+
+
+

+ Some Photos! +

+ +
+ +
+
+
+ )} + + ); } export default SomePhotos; diff --git a/web/src/main.tsx b/web/src/main.tsx index d15648ae..c75d3039 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -39,7 +39,7 @@ const router = createBrowserRouter( } /> } /> } /> - }/> + } /> ) );