Skip to content

Commit

Permalink
Update superforms import and usage in layout server
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardspresume committed Mar 5, 2024
1 parent 3325155 commit a3824e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { LayoutServerLoad } from './$types';

import { loadFlash } from 'sveltekit-flash-message/server';
import { superValidate } from 'sveltekit-superforms/server';
import { superValidate } from 'sveltekit-superforms';
import { zod } from 'sveltekit-superforms/adapters';

import { createBaseMetaTags } from '$lib/utils/metaTags';

Expand All @@ -12,6 +13,6 @@ export const load = loadFlash(async ({ url }) => {

return {
baseMetaTags: Object.freeze(baseMetaTags),
feedbackForm: await superValidate(FeedbackValidationSchema)
feedbackForm: await superValidate(zod(FeedbackValidationSchema))
};
}) satisfies LayoutServerLoad;

0 comments on commit a3824e4

Please sign in to comment.