import Card from './Components/Card';
Using absolute imports instead of relative can make refactoring a project much easier.
App.js
export const requireAuth: MiddlewareHandler<{ | |
Variables: { | |
session: Session; | |
user: User; | |
}; | |
}> = createMiddleware(async (c, next) => { | |
const user = c.var.user; | |
if (!user) throw new HTTPException(StatusCodes.UNAUTHORIZED, { message: 'Unauthorized' }); | |
return next(); | |
}); |
import { superValidate } from 'sveltekit-superforms/server'; | |
import type { PageServerLoad } from './$types'; | |
import { fail } from '@sveltejs/kit'; | |
import { | |
insertSurveyQuestionSchema, | |
selectSurveyAnswerSchema, | |
surveyAnswers, | |
surveyQuestions | |
} from '$lib/server/database/schema'; | |
import { db } from '$lib/server/database'; |
create table "public"."profiles" ( | |
"id" uuid not null, | |
"updated_at" timestamp with time zone, | |
"username" text, | |
"full_name" text, | |
"avatar_url" text, | |
"website" text | |
); | |
import Card from './Components/Card';
Using absolute imports instead of relative can make refactoring a project much easier.
App.js
import React, { Component } from "react"; | |
import Editor from "draft-js-plugins-editor"; | |
import { makeStyles } from "@material-ui/core/styles"; | |
import createInlineToolbarPlugin from "draft-js-inline-toolbar-plugin"; | |
import { | |
ItalicButton, | |
BoldButton, | |
UnderlineButton, | |
CodeButton |