format: run prettier

This commit is contained in:
Reinaldy Rafli 2022-09-10 20:33:58 +07:00
parent 151bbd3b31
commit 1b6a68a036
No known key found for this signature in database
GPG Key ID: EA1B2522C1693EC8
8 changed files with 25 additions and 28 deletions

View File

@ -1,7 +1,7 @@
import type { Handle } from "@sveltejs/kit";
import type { Handle } from '@sveltejs/kit';
export const handle: Handle = ({ event, resolve }) => {
return resolve(event, {
transformPageChunk: ({ html }) => html.replace('%lang%', "en")
});
}
return resolve(event, {
transformPageChunk: ({ html }) => html.replace('%lang%', 'en'),
});
};

View File

@ -1,21 +1,19 @@
import { $fetch } from "ohmyfetch";
import env from "../lib/env";
import { $fetch } from 'ohmyfetch';
import env from '../lib/env';
interface TotalResponse {
message: number;
message: number;
}
/** @type {import('./$types').PageServerLoad} */
export async function load() {
const response = await $fetch<TotalResponse>(
"total",
{
method: "GET",
baseURL: env.API_ENDPOINT,
parseResponse: JSON.parse
});
const response = await $fetch<TotalResponse>('total', {
method: 'GET',
baseURL: env.API_ENDPOINT,
parseResponse: JSON.parse,
});
return {
total: response.message
}
return {
total: response.message,
};
}

View File

@ -22,12 +22,12 @@ const config = {
assets: './static',
hooks: {
server: './src',
client: './src'
client: './src',
},
lib: './src/lib',
},
adapter: adapter({
out: "dist"
out: 'dist',
}),
},
};

View File

@ -24,8 +24,8 @@
"allowJs": true,
"checkJs": true,
"paths": {
"$lib":["src/lib"],
"$lib/*":["src/lib/*"]
"$lib": ["src/lib"],
"$lib/*": ["src/lib/*"]
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]

View File

@ -2,6 +2,5 @@ import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
plugins: [sveltekit()],
});