format: run prettier
This commit is contained in:
parent
151bbd3b31
commit
1b6a68a036
|
@ -1,7 +1,7 @@
|
||||||
import type { Handle } from "@sveltejs/kit";
|
import type { Handle } from '@sveltejs/kit';
|
||||||
|
|
||||||
export const handle: Handle = ({ event, resolve }) => {
|
export const handle: Handle = ({ event, resolve }) => {
|
||||||
return resolve(event, {
|
return resolve(event, {
|
||||||
transformPageChunk: ({ html }) => html.replace('%lang%', "en")
|
transformPageChunk: ({ html }) => html.replace('%lang%', 'en'),
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { $fetch } from "ohmyfetch";
|
import { $fetch } from 'ohmyfetch';
|
||||||
import env from "../lib/env";
|
import env from '../lib/env';
|
||||||
|
|
||||||
interface TotalResponse {
|
interface TotalResponse {
|
||||||
message: number;
|
message: number;
|
||||||
|
@ -7,15 +7,13 @@ interface TotalResponse {
|
||||||
|
|
||||||
/** @type {import('./$types').PageServerLoad} */
|
/** @type {import('./$types').PageServerLoad} */
|
||||||
export async function load() {
|
export async function load() {
|
||||||
const response = await $fetch<TotalResponse>(
|
const response = await $fetch<TotalResponse>('total', {
|
||||||
"total",
|
method: 'GET',
|
||||||
{
|
|
||||||
method: "GET",
|
|
||||||
baseURL: env.API_ENDPOINT,
|
baseURL: env.API_ENDPOINT,
|
||||||
parseResponse: JSON.parse
|
parseResponse: JSON.parse,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
total: response.message
|
total: response.message,
|
||||||
}
|
};
|
||||||
}
|
}
|
|
@ -22,12 +22,12 @@ const config = {
|
||||||
assets: './static',
|
assets: './static',
|
||||||
hooks: {
|
hooks: {
|
||||||
server: './src',
|
server: './src',
|
||||||
client: './src'
|
client: './src',
|
||||||
},
|
},
|
||||||
lib: './src/lib',
|
lib: './src/lib',
|
||||||
},
|
},
|
||||||
adapter: adapter({
|
adapter: adapter({
|
||||||
out: "dist"
|
out: 'dist',
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,5 +3,4 @@ import { defineConfig } from 'vite';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [sveltekit()],
|
plugins: [sveltekit()],
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue