diff --git a/src/App.tsx b/src/App.tsx index c90abf04..9ff04ee2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,10 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect } from 'react'; import { HashRouter } from 'react-router-dom'; -import { chakra } from '@chakra-ui/react'; + import { NavApp } from './navigation/AppNav'; import { AppRadarProvider } from './radar/RadarProvider'; import { AppUiProvider } from './ui/AppUiProvider'; import { getDataVersion } from 'helpers/databaseClient'; -import loader from './assets/loader.svg'; import './App.css'; @@ -16,40 +15,10 @@ import './App.css'; * and replace HashRouter **/ export const App: React.FC = () => { - const [isLoading, setIsLoading] = useState(true); useEffect(() => { - const fetchDataVersion = async (): Promise => { - try { - setIsLoading(true); - await getDataVersion(); - } catch (err) { - console.error('Failed to fetch data version:', err); - } finally { - setIsLoading(false); - } - }; - - void fetchDataVersion(); + void getDataVersion(); }, []); - if (isLoading) { - return ( - - loading spinner - Loading... - - ); - } - return ( diff --git a/src/components/infoCard/InfoCard.tsx b/src/components/infoCard/InfoCard.tsx index 36101011..fbd458b7 100644 --- a/src/components/infoCard/InfoCard.tsx +++ b/src/components/infoCard/InfoCard.tsx @@ -30,7 +30,7 @@ export const InfoCard: React.FC = ({ }) => { const infoRoute = useLocation().pathname.split('/')[1]; const fallBackImage = background; - // 'https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg'; + // 'https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png'; return (
diff --git a/src/components/projectPreview/ProjectPreviewCard.tsx b/src/components/projectPreview/ProjectPreviewCard.tsx index 34987462..0b1f2e41 100644 --- a/src/components/projectPreview/ProjectPreviewCard.tsx +++ b/src/components/projectPreview/ProjectPreviewCard.tsx @@ -16,7 +16,7 @@ interface Props { export const ProjectPreviewCard: React.FC = ({ project }) => { const { setCurrentProject } = useContext(RadarContext); const fallBackImage = - 'https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg'; + 'https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png'; return (
diff --git a/src/components/shared/image/Image.tsx b/src/components/shared/image/Image.tsx index 13e520cb..6cd58854 100644 --- a/src/components/shared/image/Image.tsx +++ b/src/components/shared/image/Image.tsx @@ -5,7 +5,7 @@ interface Props { } const FALLBACK_IMAGE = - 'https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg'; + 'https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png'; export const Image: React.FC = ({ imgUrl }) => ( { width={'75%'} paddingLeft={'25%'} src={`${selectedItem['Image Url']}`} - fallbackSrc='https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg' + fallbackSrc='https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png' alt='Default Image' /> diff --git a/src/pages/homePage/components/HomeCardMini.tsx b/src/pages/homePage/components/HomeCardMini.tsx index 709dad97..a31faab9 100644 --- a/src/pages/homePage/components/HomeCardMini.tsx +++ b/src/pages/homePage/components/HomeCardMini.tsx @@ -13,7 +13,7 @@ interface Props { export const HomeCardMini: React.FC = ({ project, type = '' }) => { const { setCurrentProject } = useContext(RadarContext); const fallBackImage = - 'https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg'; + 'https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png'; return (
= ({ blips }) => { Default Image diff --git a/src/pages/projects/projectComponent/Project.tsx b/src/pages/projects/projectComponent/Project.tsx index 70035345..6bb50bd4 100644 --- a/src/pages/projects/projectComponent/Project.tsx +++ b/src/pages/projects/projectComponent/Project.tsx @@ -24,7 +24,7 @@ export const Project: React.FC = ({ const path = useLocation().pathname; const fallBackImage = - 'https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg'; + 'https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png'; const handleMoreClick = (e: React.MouseEvent): void => { e.preventDefault(); diff --git a/src/pages/projects/projectDetails/ProjectDetails.tsx b/src/pages/projects/projectDetails/ProjectDetails.tsx index 57e3a0f6..4b7226e1 100644 --- a/src/pages/projects/projectDetails/ProjectDetails.tsx +++ b/src/pages/projects/projectDetails/ProjectDetails.tsx @@ -15,7 +15,7 @@ import DeleteIcon from '@mui/icons-material/Delete'; import { isAdmin } from 'components/shared/helpers/auth'; const fallBackImage = - 'https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg'; + 'https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png'; export const ProjectDetails: React.FC = () => { const [project, setProject] = useState(null); diff --git a/src/pages/projects/projectOverlay/projectOverlay.tsx b/src/pages/projects/projectOverlay/projectOverlay.tsx index 78e5d336..f7931bd0 100644 --- a/src/pages/projects/projectOverlay/projectOverlay.tsx +++ b/src/pages/projects/projectOverlay/projectOverlay.tsx @@ -17,7 +17,7 @@ interface Props { } const fallBackImage = - 'https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg'; + 'https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png'; export const ProjectOverlay: React.FC = ({ project, diff --git a/src/pages/search/SearchResult.tsx b/src/pages/search/SearchResult.tsx index 58499099..4bb2ed89 100644 --- a/src/pages/search/SearchResult.tsx +++ b/src/pages/search/SearchResult.tsx @@ -74,7 +74,7 @@ export const SearchResult: React.FC = ( objectFit='scale-down' h='100%' src={`${value['Image Url']}`} - fallbackSrc='https://frigiv.palsgaard.com/media/1303/palsgaard-supports-the-un-sustainable-development-goals.jpg' + fallbackSrc='https://sxmzetpbqzjchodypatn.supabase.co/storage/v1/object/public/project-images//fallback-image.png' alt='Default Image' /> diff --git a/src/pages/search/SearchView.tsx b/src/pages/search/SearchView.tsx index 49232b5a..c137391c 100644 --- a/src/pages/search/SearchView.tsx +++ b/src/pages/search/SearchView.tsx @@ -155,7 +155,7 @@ export const SearchView: React.FC = ({ Default Image