ESLint Fixes

This commit is contained in:
Atridad Lahiji 2023-12-13 14:52:56 -07:00
parent 3968dcb251
commit 0e21900e83
No known key found for this signature in database
10 changed files with 16 additions and 16 deletions

View file

@ -1,5 +1,5 @@
import { getAuth } from "@clerk/remix/ssr.server";
import { LoaderFunctionArgs, json } from "@remix-run/node";
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { eq } from "drizzle-orm";
import { eventStream } from "remix-utils/sse/server";
import { db } from "~/services/db.server";

View file

@ -1,5 +1,5 @@
import { getAuth } from "@clerk/remix/ssr.server";
import { LoaderFunctionArgs, json } from "@remix-run/node";
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { eq } from "drizzle-orm";
import { eventStream } from "remix-utils/sse/server";
import { db } from "~/services/db.server";

View file

@ -1,5 +1,5 @@
import { getAuth } from "@clerk/remix/ssr.server";
import { LoaderFunctionArgs, json } from "@remix-run/node";
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { and, eq } from "drizzle-orm";
import { eventStream } from "remix-utils/sse/server";
import { db } from "~/services/db.server";

View file

@ -1,5 +1,5 @@
import { getAuth } from "@clerk/remix/ssr.server";
import { ActionFunctionArgs, json } from "@remix-run/node";
import { type ActionFunctionArgs, json } from "@remix-run/node";
import { createId } from "@paralleldrive/cuid2";
import { db } from "~/services/db.server";
import { emitter } from "~/services/emitter.server";

View file

@ -1,5 +1,5 @@
import { getAuth } from "@clerk/remix/ssr.server";
import { ActionFunctionArgs, json } from "@remix-run/node";
import { type ActionFunctionArgs, json } from "@remix-run/node";
import { createId } from "@paralleldrive/cuid2";
import { db } from "~/services/db.server";
import { emitter } from "~/services/emitter.server";

View file

@ -1,5 +1,5 @@
import { getAuth } from "@clerk/remix/ssr.server";
import { LoaderFunctionArgs, json } from "@remix-run/node";
import { type LoaderFunctionArgs, json } from "@remix-run/node";
import { eq } from "drizzle-orm";
import { eventStream } from "remix-utils/sse/server";
import { db } from "~/services/db.server";

View file

@ -1,6 +1,6 @@
import { ActionFunctionArgs, json } from "@remix-run/node";
import { type ActionFunctionArgs, json } from "@remix-run/node";
import { Webhook } from "svix";
import { WebhookEvent } from "@clerk/remix/api.server";
import { type WebhookEvent } from "@clerk/remix/api.server";
import {
onUserCreatedHandler,
onUserDeletedHandler,

View file

@ -51,7 +51,7 @@ export default function Dashboard() {
function DashboardContent() {
const { user, isLoaded } = useUser();
let roomsFromDb = useEventSource("/api/room/get/all", { event: user?.id! });
let roomsFromDb = useEventSource("/api/room/get/all", { event: user?.id });
let roomsFromDbParsed = JSON.parse(roomsFromDb!) as RoomsResponse;

View file

@ -1,5 +1,5 @@
import { getAuth } from "@clerk/remix/ssr.server";
import { LoaderFunction, redirect } from "@remix-run/node";
import { type LoaderFunction, redirect } from "@remix-run/node";
import { useParams } from "@remix-run/react";
import {
CheckCircleIcon,
@ -17,7 +17,7 @@ import {
import { useEffect, useState } from "react";
import LoadingIndicator from "~/components/LoadingIndicator";
import { useEventSource } from "remix-utils/sse/react";
import {
import type {
PresenceItem,
RoomResponse,
VoteResponse,
@ -223,12 +223,12 @@ function RoomContent() {
);
if (visible) {
if (!!matchedVote) {
if (matchedVote) {
return <div>{matchedVote.value}</div>;
} else {
return <HourglassIcon className="text-xl text-error" />;
}
} else if (!!matchedVote) {
} else if (matchedVote) {
return <CheckCircleIcon className="text-xl text-success" />;
} else {
return <HourglassIcon className="text-xl animate-spin text-warning" />;
@ -296,7 +296,7 @@ function RoomContent() {
<div className="w-10 rounded-full avatar">
<img
src={presenceItem.userImageUrl}
alt={`${presenceItem.userFullName}'s Profile Picture`}
alt={`${presenceItem.userFullName}'s Profile`}
height={32}
width={32}
/>
@ -335,7 +335,7 @@ function RoomContent() {
{roomFromDb &&
votesFromDb &&
voteString(
roomFromDbParsed?.visible!,
roomFromDbParsed?.visible || false,
votesFromDbParsed,
presenceItem
)}

View file

@ -86,7 +86,7 @@ export const subscribeToChannel = async (
};
export const unsubscribeToChannel = (channel: string) => {
`Unsubscribed successfully from ${channel}!`;
console.log(`Unsubscribed successfully from ${channel}!`);
Promise.resolve([sub?.unsubscribe(channel)]);
};