Private
Public Access
17 lines
361 B
TypeScript
17 lines
361 B
TypeScript
import { obtenerRepuestos } from '$lib/hooks/repuestos/obtenerRepuestos';
|
|
|
|
export let ssr = false;
|
|
export async function load({ fetch, depends }) {
|
|
depends('repuestos:load');
|
|
const repuestos = await obtenerRepuestos(fetch);
|
|
|
|
let error = '';
|
|
if (typeof repuestos === 'string') {
|
|
error = repuestos;
|
|
}
|
|
return {
|
|
repuestos: repuestos,
|
|
error: error
|
|
};
|
|
}
|