Skip to content

Commit

Permalink
chore: remoe unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ephraimduncan committed Feb 22, 2024
1 parent 24ca1ed commit 8eada24
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/app/(auth)/login/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { APP_TITLE } from "~/lib/constants";
import { login } from "~/lib/auth/actions";
import { Label } from "~/components/ui/label";
import { SubmitButton } from "~/components/submit-button";
import { Input } from "@/components/ui/input";
import { Input } from "~/components/ui/input";

export function Login() {
const [state, formAction] = useFormState(login, null);
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/verify-email/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { redirect } from "next/navigation";
import { validateRequest } from "~/lib/auth/validate-request";
import { VerifyCode } from "./verify-code";
import { redirects } from "~/lib/constants";
import type { User } from "@/server/db/schema";
import type { User } from "~/server/db/schema";

export const metadata = {
title: "Verify Email",
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/_components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from "next/link";
import { UserDropdown } from "~/app/(main)/_components/user-dropdown";
import { FunctionSquare } from "lucide-react";
import { APP_TITLE } from "@/lib/constants";
import { APP_TITLE } from "~/lib/constants";
import type { User } from "~/server/db/schema";

const routes = [{ name: "Dashboard", href: "/dashboard" }] as const;
Expand Down
4 changes: 2 additions & 2 deletions src/app/(main)/dashboard/_components/delete-form-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Button } from "@/components/ui/button";
import { Button } from "~/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
} from "~/components/ui/dialog";
import { TrashIcon } from "@radix-ui/react-icons";
import { useRouter } from "next/navigation";
import React from "react";
Expand Down
14 changes: 7 additions & 7 deletions src/app/(main)/dashboard/_components/form-card.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import Link from "next/link";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import type { RouterOutputs } from "@/trpc/shared";
import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card";
import type { RouterOutputs } from "~/trpc/shared";

import { CopyButton } from "@/components/copy-button";
import { Button } from "@/components/ui/button";
import { CopyButton } from "~/components/copy-button";
import { Button } from "~/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
} from "~/components/ui/dropdown-menu";
import { DotsVerticalIcon } from "@radix-ui/react-icons";
import { formatDistanceToNow } from "date-fns";
import { api } from "@/trpc/react";
import { Skeleton } from "@/components/ui/skeleton";
import { api } from "~/trpc/react";
import { Skeleton } from "~/components/ui/skeleton";
import { DeleteFormDialog } from "./delete-form-dialog";

type FormCardProp = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/dashboard/_components/forms.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Input } from "@/components/ui/input";
import { Input } from "~/components/ui/input";
import * as React from "react";
import { type RouterOutputs } from "~/trpc/shared";
import { FormCard } from "./form-card";
Expand Down
8 changes: 0 additions & 8 deletions src/app/(main)/dashboard/_components/new-form-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ import { toast } from "sonner";
import React, { useState } from "react";
import { api } from "~/trpc/react";
import { useRouter } from "next/navigation";
import { RouterOutputs } from "~/trpc/shared";

type CreateFormDialogProps = {
setOptimisticForms: (action: {
action: "add" | "delete" | "update";
post: RouterOutputs["form"]["userForms"][number];
}) => void;
};

const FormSchema = z.object({
name: z.string().min(1, {
Expand Down
5 changes: 2 additions & 3 deletions src/app/(main)/form/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { api } from "~/trpc/server";
import { CopyButton } from "@/components/copy-button";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { CopyButton } from "~/components/copy-button";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs";
import { SubmissionsTable } from "./submissions-table";
import CopyFormId from "./copy-button";

export default async function FormPage({ params }: { params: { id: string } }) {
const formId = params.id;
Expand Down
12 changes: 6 additions & 6 deletions src/app/(main)/form/[id]/submissions-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ import type {
VisibilityState,
} from "@tanstack/react-table";

import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import { Button } from "~/components/ui/button";
import { Checkbox } from "~/components/ui/checkbox";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
} from "~/components/ui/dropdown-menu";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import type { FormData } from "@/server/db/schema";
import { api } from "@/trpc/react";
} from "~/components/ui/table";
import type { FormData } from "~/server/db/schema";
import { api } from "~/trpc/react";

type SubmissionsTableProps = {
formId: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/copy-button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { useCopyToClipboard } from "@/lib/hooks/use-copy-to-clipboard";
import { useCopyToClipboard } from "~/lib/hooks/use-copy-to-clipboard";
import { Copy } from "lucide-react";
import { toast } from "sonner";

Expand Down
4 changes: 2 additions & 2 deletions src/lib/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Lucia, TimeSpan } from "lucia";
import type { Adapter } from "lucia";
import { GitHub } from "arctic";
import { env } from "~/env.js";
import { sessions, users, type User as DbUser } from "@/server/db/schema";
import { db } from "@/server/db";
import { sessions, users, type User as DbUser } from "~/server/db/schema";
import { db } from "~/server/db";
import { webcrypto } from "node:crypto";
import { DrizzlePostgreSQLAdapter } from "@lucia-auth/adapter-drizzle";

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/* Path Aliases */
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"~/*": ["./src/*"]
}
},
Expand Down

0 comments on commit 8eada24

Please sign in to comment.