Skip to content
Snippets Groups Projects
Commit c4e24269 authored by Rémi PAPIN's avatar Rémi PAPIN
Browse files

remove red square on no konnector

parent 30819d2c
Branches
Tags
1 merge request!127Features/us229 explain impossible defi
...@@ -61,3 +61,6 @@ mobile/Preview.html ...@@ -61,3 +61,6 @@ mobile/Preview.html
# Default # Default
# /!\ KEEP THIS SECTION THE LAST ONE # /!\ KEEP THIS SECTION THE LAST ONE
!.gitkeep !.gitkeep
#Report bundle analyser
public/
\ No newline at end of file
const CACHE_NAME = "version-1";
const urlsToCache = [ 'index.html', 'offline.html' ];
const self = this;
// Install SW
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME)
.then((cache) => {
console.log('Opened cache');
return cache.addAll(urlsToCache);
})
)
});
// Listen for requests
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request)
.then(() => {
return fetch(event.request)
.catch(() => caches.match('offline.html'))
})
)
});
// Activate the SW
self.addEventListener('activate', (event) => {
const cacheWhitelist = [];
cacheWhitelist.push(CACHE_NAME);
event.waitUntil(
caches.keys().then((cacheNames) => Promise.all(
cacheNames.map((cacheName) => {
if(!cacheWhitelist.includes(cacheName)) {
return caches.delete(cacheName);
}
})
))
)
});
\ No newline at end of file
...@@ -205,41 +205,42 @@ const AvailableChallengeDetailsView: React.FC<AvailableChallengeDetailsViewProps ...@@ -205,41 +205,42 @@ const AvailableChallengeDetailsView: React.FC<AvailableChallengeDetailsViewProps
<div className="cp-description text-16-bold"> <div className="cp-description text-16-bold">
{challenge.description} {challenge.description}
</div> </div>
<div className="lack-of-data-challenge"> <div>
{lackOfDataForChallenge && isLoaded ? ( {lackOfDataForChallenge && isLoaded ? (
<div className="lack-of-data-content"> <div className="lack-of-data-challenge">
<div className="warning-white"> <div className="lack-of-data-content">
<StyledIcon <div className="warning-white">
icon={warningWhite} <StyledIcon
size={36} icon={warningWhite}
className="warning-icon" size={36}
/> className="warning-icon"
/>
<span> <span>
{t('CHALLENGE.LACK_OF_DATA')}{' '} {t('CHALLENGE.LACK_OF_DATA')}{' '}
{DateTime.fromObject( {DateTime.fromObject(
lackOfDataFluidtype.periode.startDate.c lackOfDataFluidtype.periode.startDate.c
).toLocaleString(DateTime.DATE_FULL)}{' '} ).toLocaleString(DateTime.DATE_FULL)}{' '}
{t('CHALLENGE.LACK_OF_DATA_1')}{' '} {t('CHALLENGE.LACK_OF_DATA_1')}{' '}
{DateTime.fromObject( {DateTime.fromObject(
lackOfDataFluidtype.periode.endDate.c lackOfDataFluidtype.periode.endDate.c
).toLocaleString(DateTime.DATE_FULL)} ).toLocaleString(DateTime.DATE_FULL)}
{t('CHALLENGE.LACK_OF_DATA_2')} {t('CHALLENGE.LACK_OF_DATA_2')}
</span> </span>
</div>
{lackOfDataFluidtype.fluidType.map(
(idFLuid: number) => {
return (
<div key={idFLuid} className="fluid-enum">
{' '}
- {t(
'FLUID.' + FluidType[idFLuid] + '.NAME'
)}{' '}
</div>
)
}
)}
<span></span>
</div> </div>
{lackOfDataFluidtype.fluidType.map(
(idFLuid: number) => {
return (
<div key={idFLuid} className="fluid-enum">
{' '}
- {t(
'FLUID.' + FluidType[idFLuid] + '.NAME'
)}{' '}
</div>
)
}
)}
<span></span>
</div> </div>
) : null} ) : null}
</div> </div>
......
...@@ -514,6 +514,7 @@ ...@@ -514,6 +514,7 @@
} }
} }
.lack-of-data-challenge { .lack-of-data-challenge {
margin: auto;
padding: 1rem; padding: 1rem;
width: 90%; width: 90%;
background-color: $red-primary; background-color: $red-primary;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment