Skip to content

Commit 4d693e2

Browse files
committed
format
1 parent 225c5c7 commit 4d693e2

File tree

9 files changed

+32
-17
lines changed

9 files changed

+32
-17
lines changed

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { NextConfig } from "next";
1+
import type { NextConfig } from 'next';
22
import { loadEnvConfig } from '@next/env';
33

44
const projectDir = process.cwd();

postcss.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = {
22
plugins: {
3-
"@tailwindcss/postcss": {},
3+
'@tailwindcss/postcss': {},
44
},
55
};
66

src/components/Map/MapboxMap.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ import { useState, useCallback } from 'react';
1010
const MAPBOX_TOKEN = process.env.MAPBOX_ACCESS_TOKEN;
1111

1212
if (!MAPBOX_TOKEN) {
13-
throw Error('Mapbox token is missing. Please set MAPBOX_ACCESS_TOKEN in .env.local');
13+
throw Error(
14+
'Mapbox token is missing. Please set MAPBOX_ACCESS_TOKEN in .env.local',
15+
);
1416
}
1517

1618
export default function MapboxMap() {
1719
const [mapStyle, setMapStyle] = useState(MAP_STYLES.SATELLITE);
1820
const [wmsOpacity, setWmsOpacity] = useState(0.6);
19-
const [cursor, setCursor] = useState<{ lng: number; lat: number } | undefined>(undefined);
21+
const [cursor, setCursor] = useState<
22+
{ lng: number; lat: number } | undefined
23+
>(undefined);
2024

2125
const onMouseMove = useCallback((event: MapMouseEvent) => {
2226
setCursor(event.lngLat);
@@ -31,7 +35,7 @@ export default function MapboxMap() {
3135
initialViewState={{
3236
longitude: -79.957141,
3337
latitude: -2.024311,
34-
zoom: 16
38+
zoom: 16,
3539
}}
3640
style={{ width: '100%', height: '100%' }}
3741
mapStyle={mapStyle}

src/components/UI/BaseMapSwitcher.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const buttonStyles = tv({
1010
variants: {
1111
active: {
1212
true: 'bg-zinc-900 text-white dark:bg-zinc-100 dark:text-black',
13-
false: 'hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400',
13+
false:
14+
'hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400',
1415
},
1516
},
1617
});
@@ -26,18 +27,25 @@ interface BaseMapSwitcherProps {
2627
onStyleChange: (style: string) => void;
2728
}
2829

29-
export default function BaseMapSwitcher({ currentStyle, onStyleChange }: BaseMapSwitcherProps) {
30+
export default function BaseMapSwitcher({
31+
currentStyle,
32+
onStyleChange,
33+
}: BaseMapSwitcherProps) {
3034
return (
3135
<div className={switcherStyles()}>
3236
<button
33-
className={buttonStyles({ active: currentStyle === MAP_STYLES.SATELLITE })}
37+
className={buttonStyles({
38+
active: currentStyle === MAP_STYLES.SATELLITE,
39+
})}
3440
onClick={() => onStyleChange(MAP_STYLES.SATELLITE)}
3541
>
3642
<Satellite size={16} />
3743
<span>Satellite</span>
3844
</button>
3945
<button
40-
className={buttonStyles({ active: currentStyle === MAP_STYLES.STREETS })}
46+
className={buttonStyles({
47+
active: currentStyle === MAP_STYLES.STREETS,
48+
})}
4149
onClick={() => onStyleChange(MAP_STYLES.STREETS)}
4250
>
4351
<Map size={16} />

src/components/UI/CoordinateDisplay.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ interface CoordinateDisplayProps {
99
latitude?: number;
1010
}
1111

12-
export default function CoordinateDisplay({ longitude, latitude }: CoordinateDisplayProps) {
12+
export default function CoordinateDisplay({
13+
longitude,
14+
latitude,
15+
}: CoordinateDisplayProps) {
1316
if (longitude === undefined || latitude === undefined) return null;
1417

1518
return (

src/pages/_app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "@/styles/globals.css";
2-
import type { AppProps } from "next/app";
1+
import '@/styles/globals.css';
2+
import type { AppProps } from 'next/app';
33

44
export default function App({ Component, pageProps }: AppProps) {
55
return <Component {...pageProps} />;

src/pages/_document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Html, Head, Main, NextScript } from "next/document";
1+
import { Html, Head, Main, NextScript } from 'next/document';
22

33
export default function Document() {
44
return (

src/pages/api/hello.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2-
import type { NextApiRequest, NextApiResponse } from "next";
2+
import type { NextApiRequest, NextApiResponse } from 'next';
33

44
type Data = {
55
name: string;
@@ -9,5 +9,5 @@ export default function handler(
99
req: NextApiRequest,
1010
res: NextApiResponse<Data>,
1111
) {
12-
res.status(200).json({ name: "John Doe" });
12+
res.status(200).json({ name: 'John Doe' });
1313
}

src/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Head from "next/head";
2-
import MapboxMap from "@/components/Map/MapboxMap";
1+
import Head from 'next/head';
2+
import MapboxMap from '@/components/Map/MapboxMap';
33

44
export default function Home() {
55
return (

0 commit comments

Comments
 (0)