Skip to content

Instantly share code, notes, and snippets.

View Aanya9693's full-sized avatar

Aanya Kumari Aanya9693

View GitHub Profile
$: if ($message?.status == "success" && $message.content) {
toast.success($message.content, {
position: "top-right",
});
} else if ($message?.status == "failed" && $message.content) {
toast.error("Error occuured while submitting form! Try again.", {
position: "top-right",
});
}
import { superValidate, message } from 'sveltekit-superforms/server';
// import { requestSchema } from '$lib/schemas';
import { z } from 'zod';
let actionResponse = {
status: 'failed',
content: ''
};
export const load = async ({ cookies }) => {
return {
jwtToken: cookies.get('jwtToken')