From ec53a46bc3683b22ac81daf72c14799840940f23 Mon Sep 17 00:00:00 2001 From: Pinx0 Date: Wed, 6 Nov 2024 17:44:11 +0100 Subject: [PATCH] style: run prettier --- src/components/map/map.tsx | 2 +- src/context/TownProvider.tsx | 2 +- src/helpers/constants.ts | 4 ++-- src/lib/supabase/server.ts | 20 +++++++++----------- src/types/Town.ts | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/components/map/map.tsx b/src/components/map/map.tsx index f93ec317..c2dcfcbf 100644 --- a/src/components/map/map.tsx +++ b/src/components/map/map.tsx @@ -54,7 +54,7 @@ const Map: FC = ({ center = [0, 0], zoom = 2, markers = [] }) => { className: 'map-popup', maxWidth: `${markerData.width}px`, anchor: 'left', - }).setHTML(markerData.descriptionHTML) + }).setHTML(markerData.descriptionHTML), ) .addTo(mapRef.current!); diff --git a/src/context/TownProvider.tsx b/src/context/TownProvider.tsx index 535114a3..1e7ede0e 100644 --- a/src/context/TownProvider.tsx +++ b/src/context/TownProvider.tsx @@ -7,7 +7,7 @@ const TownsContext = createContext([]); type TownsProviderProps = { children: ReactNode; towns: Town[]; -} +}; export const TownsProvider: React.FC = ({ children, towns }) => { return {children}; diff --git a/src/helpers/constants.ts b/src/helpers/constants.ts index 293138e0..431ddc2f 100644 --- a/src/helpers/constants.ts +++ b/src/helpers/constants.ts @@ -7,12 +7,12 @@ export const tiposAyudaOptions = { medica: 'Asistencia médica', psicologico: 'Apoyo psicológico', logistico: 'Apoyo logístico', - otros: 'Ayuda general' + otros: 'Ayuda general', }; export const tiposAyudaAcepta = ['Alimentos', 'Ropa', 'Mantas', 'Agua', 'Productos de higiene', 'Medicamentos']; -export const mapToIdAndLabel = (data:any) => { +export const mapToIdAndLabel = (data: any) => { return Object.keys(data).map((key) => ({ id: key, label: data[key], diff --git a/src/lib/supabase/server.ts b/src/lib/supabase/server.ts index 5f4cdd4f..5bb64f40 100644 --- a/src/lib/supabase/server.ts +++ b/src/lib/supabase/server.ts @@ -1,11 +1,11 @@ -"use server" +'use server'; -import { createServerClient } from '@supabase/ssr' -import { cookies } from 'next/headers' +import { createServerClient } from '@supabase/ssr'; +import { cookies } from 'next/headers'; import { Database } from '@/types/database'; export async function createClient() { - const cookieStore = await cookies() + const cookieStore = await cookies(); return createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, @@ -13,13 +13,11 @@ export async function createClient() { { cookies: { getAll() { - return cookieStore.getAll() + return cookieStore.getAll(); }, setAll(cookiesToSet) { try { - cookiesToSet.forEach(({ name, value, options }) => - cookieStore.set(name, value, options) - ) + cookiesToSet.forEach(({ name, value, options }) => cookieStore.set(name, value, options)); } catch { // The `setAll` method was called from a Server Component. // This can be ignored if you have middleware refreshing @@ -27,6 +25,6 @@ export async function createClient() { } }, }, - } - ) -} \ No newline at end of file + }, + ); +} diff --git a/src/types/Town.ts b/src/types/Town.ts index f1d882d3..160382a6 100644 --- a/src/types/Town.ts +++ b/src/types/Town.ts @@ -1,3 +1,3 @@ import { Database } from '@/types/database'; -export type Town = Database['public']['Tables']['towns']['Row']; \ No newline at end of file +export type Town = Database['public']['Tables']['towns']['Row'];