Run prettier

This commit is contained in:
2026-02-07 00:38:56 +00:00
parent ca5e78e2b1
commit cfa1d44dbc
4 changed files with 1275 additions and 1265 deletions

View File

@@ -5,12 +5,6 @@
let searchTerm = '';
const formatDate = (dateVal: string | null) => {
if (!dateVal) return '---';
const d = new Date(dateVal);
return d.toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: '2-digit' });
};
$: filteredMaps = data.maps.filter(
(m) =>
m.routeId.toString().includes(searchTerm) ||
@@ -26,6 +20,21 @@
return checkedDate > oneYearAgo ? 'verified' : 'stale';
};
const formatDate = (dateVal: string | null) => {
if (!dateVal) return 'N/A';
const date = new Date(dateVal);
// Check for invalid dates to avoid "NaN/NaN/NaN"
if (isNaN(date.getTime())) return 'Invalid Date';
const d = date.getDate().toString().padStart(2, '0');
const m = (date.getMonth() + 1).toString().padStart(2, '0');
const y = date.getFullYear().toString().slice(-2);
return `${d}/${m}/${y}`;
};
</script>
<div class="page-wrapper">
@@ -91,9 +100,9 @@
</div>
<div class="card-footer">
<span>Created: {formatDate(map.created)}</span>
<span>Created on {formatDate(map.created)}</span>
{#if map.checked}
<span>• Checked: {formatDate(map.checked)}</span>
<span>• Checked & Updated on {formatDate(map.checked)}</span>
{/if}
</div>
</a>
@@ -108,7 +117,7 @@
:global(body) {
margin: 0;
background-color: #404c55;
background-image: radial-gradient(#2b343c,#404c55);
background-image: radial-gradient(#2b343c, #404c55);
color: #0f172a;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@@ -121,16 +130,16 @@
.main-header {
margin-bottom: 1.5rem;
position: fixed;
top: 0;
left: 0;
width: 100%;
background: #3c6f79;
color: #ebebeb;
position: fixed;
top: 0;
left: 0;
width: 100%;
background: #3c6f79;
color: #ebebeb;
}
.brand-container {
margin: 15px;
margin: 15px;
display: flex;
align-items: center;
gap: 1rem;
@@ -198,7 +207,7 @@
display: flex;
flex-direction: column;
gap: 1rem;
padding-top: 90px;
padding-top: 90px;
}
.card {