Skip to content

Commit

Permalink
fix: misc linting warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
flowergardn committed Dec 9, 2023
1 parent a8691b1 commit 8ed2326
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/EditCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UseFormRegister } from "react-hook-form";
import type { UseFormRegister } from "react-hook-form";

export type CardDataValues = {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Signatures.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "react";
import CardWish from "~/interfaces/CardWish";
import type CardWish from "~/interfaces/CardWish";
import { Trash } from "./Icons";
import toast from "react-hot-toast";
import { api } from "~/utils/api";
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/CardWish.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Wishes } from "@prisma/client";
import type { Wishes } from "@prisma/client";

export default interface CardWish extends Wishes {
profilePicture: string;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/c/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GetStaticProps, NextPage } from "next";
import type { GetStaticProps, NextPage } from "next";
import Head from "next/head";
import Navbar from "~/components/Navbar";
import { generateSSGHelper } from "~/server/api/helpers/ssgHelper";
Expand Down
5 changes: 3 additions & 2 deletions src/pages/c/[id]/sign.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { GetStaticProps, NextPage } from "next";
import type { GetStaticProps, NextPage } from "next";
import Head from "next/head";
import Navbar from "~/components/Navbar";
import { generateSSGHelper } from "~/server/api/helpers/ssgHelper";
import { api } from "~/utils/api";
import { SubmitHandler, useForm } from "react-hook-form";
import { useForm } from "react-hook-form";
import type { SubmitHandler } from "react-hook-form";

type FormValues = {
message: string;
Expand Down
9 changes: 5 additions & 4 deletions src/pages/manage/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { GetStaticProps, NextPage } from "next";
import type { GetStaticProps, NextPage } from "next";
import Head from "next/head";
import Link from "next/link";
import { SubmitHandler, useForm } from "react-hook-form";
import type { SubmitHandler } from "react-hook-form";
import { useForm } from "react-hook-form";
import toast from "react-hot-toast";
import { CardDataValues, Textbox } from "~/components/EditCard";
import { Textbox } from "~/components/EditCard";
import type { CardDataValues } from "~/components/EditCard";
import Navbar from "~/components/Navbar";
import Signatures from "~/components/Signatures";
import { generateSSGHelper } from "~/server/api/helpers/ssgHelper";
Expand Down
3 changes: 1 addition & 2 deletions src/server/api/routers/cards.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import dayjs from "dayjs";
import { z } from "zod";
import { clerkClient } from "@clerk/nextjs";

import { createTRPCRouter, privateProcedure } from "~/server/api/trpc";
import CardWish from "~/interfaces/CardWish";
import type CardWish from "~/interfaces/CardWish";
import { TRPCError } from "@trpc/server";

export const cardRouter = createTRPCRouter({
Expand Down
2 changes: 1 addition & 1 deletion src/server/api/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const createTRPCRouter = t.router;
*/
export const publicProcedure = t.procedure;

const enforceUserIsAuthed = t.middleware(async ({ ctx, next, path }) => {
const enforceUserIsAuthed = t.middleware(async ({ ctx, next }) => {
if (!ctx.userId) {
throw new TRPCError({
code: "UNAUTHORIZED",
Expand Down

0 comments on commit 8ed2326

Please sign in to comment.