Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 3 additions & 34 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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<void> => {
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 (
<chakra.section
display={'flex'}
flexDirection={'row'}
alignItems={'center'}
justifyContent={'center'}
height={'100vh'}
fontWeight='500'
color='#334683'
gap={'10px'}
>
<img src={loader} alt='loading spinner' />
<span>Loading...</span>
</chakra.section>
);
}

return (
<AppUiProvider>
<AppRadarProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/components/infoCard/InfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const InfoCard: React.FC<Props> = ({
}) => {
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 (
<Link to={`/${infoRoute}/${slug}`} className='infoCard'>
<div className='infoImage'>
Expand Down
2 changes: 1 addition & 1 deletion src/components/projectPreview/ProjectPreviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface Props {
export const ProjectPreviewCard: React.FC<Props> = ({ 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 (
<div className='projectPreviewContainer'>
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Props> = ({ imgUrl }) => (
<img
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/blip/BlipView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const BlipView: FC = () => {
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'
/>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/homePage/components/HomeCardMini.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Props {
export const HomeCardMini: React.FC<Props> = ({ 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 (
<div className='homeComponent'>
<Link
Expand Down
2 changes: 1 addition & 1 deletion src/pages/map-view/ProjectSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const ProjectSlider: React.FC<Props> = ({ blips }) => {
<Image
objectFit='cover'
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'
/>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/projects/projectComponent/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Project: React.FC<Props> = ({

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();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/projects/projectDetails/ProjectDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>(null);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/projects/projectOverlay/projectOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Props> = ({
project,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/search/SearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const SearchResult: React.FC<SearchResultProps> = (
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'
/>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/search/SearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const SearchView: React.FC<SearchViewProps> = ({
<Image
objectFit='cover'
src={`${techContent['Image Url'] || techContent['img_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'
/>
</Stack>
Expand Down