Skip to content

Commit

Permalink
feat: update map pin clusters (ONEARMY#3855) fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-ross committed Nov 21, 2024
1 parent 7150fa3 commit 2c0e922
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/pages/Maps/Content/MapView/Sprites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ import './sprites.css'
export const createClusterIcon = () => {
const { theme } = useThemeUI() as any
const path = clusterIcon
let iconAsString:string = ""
let iconAsString: string = ''
useEffect(() => {
fetch(path)
.then(response => response.text())
.then(data => {
iconAsString = data.replaceAll(/#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/g, theme.colors.accent.base)
.then((response) => response.text())
.then((data) => {
iconAsString = data.replaceAll(
/#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/g,
theme.colors.accent.base,
)
})
}, [path, theme]);
}, [path, theme])
return (cluster: MarkerCluster) => {
const className = ['icon']
let icon: any
Expand Down

0 comments on commit 2c0e922

Please sign in to comment.