Skip to content

Commit

Permalink
Add/update files from bolt.new
Browse files Browse the repository at this point in the history
Uploaded 42 files
  • Loading branch information
midnitemarauder committed Nov 23, 2024
1 parent a262758 commit 0e5da35
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 111 deletions.
99 changes: 1 addition & 98 deletions public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions public/squaredlogowname.webp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function Logo() {
<div className="h-16 w-48 relative overflow-hidden rounded-lg">
{/* Main Logo */}
<img
src="/logo.png"
src="/squaredlogowname.webp"
alt="Link Light Solutions"
className={`h-full w-full object-contain transition-all duration-500 ${
imageLoaded ? 'opacity-100 scale-100' : 'opacity-0 scale-95'
Expand Down
31 changes: 19 additions & 12 deletions src/components/MapComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ const mapOptions = {
const createMarkerIcon = (status: 'completed' | 'ongoing', index: number) => ({
path: "M-10,0a10,10 0 1,0 20,0a10,10 0 1,0 -20,0",
fillColor: status === 'completed' ? '#3B82F6' : '#F59E0B',
fillOpacity: 0.9,
strokeWeight: 2,
strokeColor: '#ffffff',
scale: 1,
fillOpacity: status === 'completed' ? 0.4 : 0.9,
strokeWeight: status === 'completed' ? 1 : 2,
strokeColor: status === 'completed' ? 'rgba(255,255,255,0.5)' : '#ffffff',
scale: status === 'completed' ? 0.7 : 1,
animation: window.google?.maps.Animation.NONE,
className: 'map-marker',
style: {
style: status === 'ongoing' ? {
animation: `marker-flicker 1.5s ease-in-out ${index * 0.1}s infinite, marker-glow 2s ease-in-out ${index * 0.2}s infinite`
}
} : undefined
});

const getCityFromAddress = (address: string) => {
Expand All @@ -114,11 +114,18 @@ export default function MapComponent({ installations }: MapComponentProps) {
setSelectedMarker(installation);
}, []);

// Sort installations to render completed markers first (underneath) and ongoing last (on top)
const markers = useMemo(() =>
installations.map((installation, index) => ({
...installation,
icon: createMarkerIcon(installation.status, index)
})),
[...installations]
.sort((a, b) => {
if (a.status === 'completed' && b.status === 'ongoing') return -1;
if (a.status === 'ongoing' && b.status === 'completed') return 1;
return 0;
})
.map((installation, index) => ({
...installation,
icon: createMarkerIcon(installation.status, index)
})),
[installations]
);

Expand Down Expand Up @@ -155,11 +162,11 @@ export default function MapComponent({ installations }: MapComponentProps) {
position={{ lat: installation.lat, lng: installation.lng }}
onClick={() => onMarkerClick(installation)}
icon={installation.icon}
label={{
label={installation.status === 'ongoing' ? {
text: getCityFromAddress(installation.address),
className: 'marker-label',
color: '#ffffff',
}}
} : undefined}
/>
))}

Expand Down

0 comments on commit 0e5da35

Please sign in to comment.