Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

chore: cleanup import export and errors

bautistaaa5f1cfbaa019e
diff --git a/apps/web/src/app/waitlist/page.tsx b/apps/web/src/app/waitlist/page.tsx
index c5bc3d2d..d284da84 100644
--- a/apps/web/src/app/waitlist/page.tsx
+++ b/apps/web/src/app/waitlist/page.tsx
@@ -1,5 +1 @@
-import Waitlist from '~/components/landing/waitlist';
-
-export default async function WaitlistPage() {
- return <Waitlist />;
-}
+export { Waitlist as default } from '~/components/landing/waitlist';
diff --git a/apps/web/src/components/challenge/comments/comment.tsx b/apps/web/src/components/challenge/comments/comment.tsx
index 9117b367..fa2eda66 100644
--- a/apps/web/src/components/challenge/comments/comment.tsx
+++ b/apps/web/src/components/challenge/comments/comment.tsx
@@ -14,7 +14,7 @@ import { replyComment, updateComment, type CommentsByChallengeId } from './comme
import { CommentDeleteDialog } from './delete';
import { getPaginatedComments } from './getCommentRouteData';
import { Markdown } from '~/components/ui/markdown';
-import ReportDialog from '~/components/report';
+import { ReportDialog } from '~/components/report';
import { getRelativeTime } from '~/utils/relativeTime';
interface SingleCommentProps {
@@ -282,9 +282,9 @@ function SingleComment({
</CommentDeleteDialog>
) : (
<ReportDialog commentId={comment.id} reportType="COMMENT">
- <button className="flex cursor-pointer items-center text-[0.8rem] text-neutral-400 duration-200 hover:text-neutral-500 dark:text-neutral-600 dark:hover:text-neutral-500">
+ <div className="flex cursor-pointer items-center text-[0.8rem] text-neutral-400 duration-200 hover:text-neutral-500 dark:text-neutral-600 dark:hover:text-neutral-500">
Report
- </button>
+ </div>
</ReportDialog>
)}
</>
diff --git a/apps/web/src/components/challenge/description/index.tsx b/apps/web/src/components/challenge/description/index.tsx
index 241a8a2a..18cbc1b3 100644
--- a/apps/web/src/components/challenge/description/index.tsx
+++ b/apps/web/src/components/challenge/description/index.tsx
@@ -27,7 +27,7 @@ import { addOrRemoveBookmark } from '../bookmark.action';
import { incrementOrDecrementUpvote } from '../increment.action';
import { Markdown } from '~/components/ui/markdown';
import { type ChallengeRouteData } from '~/app/challenge/[id]/getChallengeRouteData';
-import ReportDialog from '~/components/report';
+import { ReportDialog } from '~/components/report';
import { getRelativeTime } from '~/utils/relativeTime';
interface Props {
diff --git a/apps/web/src/components/challenge/solutions/solution-detail.tsx b/apps/web/src/components/challenge/solutions/solution-detail.tsx
index 022ec7ba..863ccd8e 100644
--- a/apps/web/src/components/challenge/solutions/solution-detail.tsx
+++ b/apps/web/src/components/challenge/solutions/solution-detail.tsx
@@ -17,7 +17,7 @@ import {
} from '@repo/ui';
import { Comments } from '../comments';
import { Markdown } from '~/components/ui/markdown';
-import ReportDialog from '~/components/report';
+import { ReportDialog } from '~/components/report';
import type { ChallengeSolution } from '~/app/challenge/[id]/solutions/[solutionId]/page';
interface Props {
diff --git a/apps/web/src/components/landing/waitlist/index.tsx b/apps/web/src/components/landing/waitlist/index.tsx
index d376ca2c..b1ec634f 100644
--- a/apps/web/src/components/landing/waitlist/index.tsx
+++ b/apps/web/src/components/landing/waitlist/index.tsx
@@ -1,8 +1,8 @@
import { Balancer } from 'react-wrap-balancer';
-import WaitlistForm from '~/components/landing/waitlist/waitlist-form';
+import { WaitlistForm } from '~/components/landing/waitlist/waitlist-form';
import styles from '~/components/landing/waitlist/waitlist.module.css';
-export default function WaitlistPage() {
+export function Waitlist() {
return (
<main className="relative min-h-[calc(100vh-56px)] sm:px-16 md:px-0">
<div className={`${styles.waitlistBackground} fixed left-0 top-0 -z-10 h-full w-full`} />
diff --git a/apps/web/src/components/landing/waitlist/waitlist-form.tsx b/apps/web/src/components/landing/waitlist/waitlist-form.tsx
index 41b88a6e..56747929 100644
--- a/apps/web/src/components/landing/waitlist/waitlist-form.tsx
+++ b/apps/web/src/components/landing/waitlist/waitlist-form.tsx
@@ -31,7 +31,7 @@ const waitlistFormSchema = z.object({
export type WaitlistFormSchema = z.infer<typeof waitlistFormSchema>;
-export default function WaitlistForm() {
+export function WaitlistForm() {
const [state, setState] = useState<'error' | 'idle' | 'submitting' | 'success'>('idle');
const isSubmitting = state === 'submitting';
diff --git a/apps/web/src/components/report/index.tsx b/apps/web/src/components/report/index.tsx
index d6fad8b3..57eeb12e 100644
--- a/apps/web/src/components/report/index.tsx
+++ b/apps/web/src/components/report/index.tsx
@@ -49,7 +49,7 @@ export interface ReportSolutionDialogProps extends ReportDialogPropsBase {
solutionId: number;
}
-export default function ReportDialog({
+export function ReportDialog({
children,
triggerAsChild = false,
reportType = 'COMMENT',
diff --git a/apps/web/src/components/user/dashboard/user-header.tsx b/apps/web/src/components/user/dashboard/user-header.tsx
index ea0fd9d3..fadfe1e7 100644
--- a/apps/web/src/components/user/dashboard/user-header.tsx
+++ b/apps/web/src/components/user/dashboard/user-header.tsx
@@ -3,7 +3,7 @@
import { type User } from '@repo/db/types';
import { Flag } from '@repo/ui/icons';
import { ActionMenu, Text } from '@repo/ui';
-import ReportDialog from '~/components/report';
+import { ReportDialog } from '~/components/report';
export interface UserHeaderProps {
user: User;