Skip to content

Commit

Permalink
style: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Pinx0 committed Nov 6, 2024
1 parent 34cbc0f commit ec53a46
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/map/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Map: FC<MapProps> = ({ center = [0, 0], zoom = 2, markers = [] }) => {
className: 'map-popup',
maxWidth: `${markerData.width}px`,
anchor: 'left',
}).setHTML(markerData.descriptionHTML)
}).setHTML(markerData.descriptionHTML),
)
.addTo(mapRef.current!);

Expand Down
2 changes: 1 addition & 1 deletion src/context/TownProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const TownsContext = createContext<Town[]>([]);
type TownsProviderProps = {
children: ReactNode;
towns: Town[];
}
};

export const TownsProvider: React.FC<TownsProviderProps> = ({ children, towns }) => {
return <TownsContext.Provider value={towns}>{children}</TownsContext.Provider>;
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
20 changes: 9 additions & 11 deletions src/lib/supabase/server.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
"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<Database>(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{
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
// user sessions.
}
},
},
}
)
}
},
);
}
2 changes: 1 addition & 1 deletion src/types/Town.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Database } from '@/types/database';

export type Town = Database['public']['Tables']['towns']['Row'];
export type Town = Database['public']['Tables']['towns']['Row'];

0 comments on commit ec53a46

Please sign in to comment.