Skip to content

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

fixes explore cards width overflow (#1705)

Aquib Baigca2ffefb21a2
diff --git a/apps/aot/src/utils/default-avatar.tsx b/apps/aot/src/utils/default-avatar.tsx
index 50081bd0..15642a47 100644
--- a/apps/aot/src/utils/default-avatar.tsx
+++ b/apps/aot/src/utils/default-avatar.tsx
@@ -1,5 +1,6 @@
import type { ComponentProps } from 'react';
+// million-ignore
export function DefaultAvatar(props: ComponentProps<'svg'>) {
return (
<svg
diff --git a/apps/web/src/app/(profile)/[username]/completed/_components/challenges.tsx b/apps/web/src/app/(profile)/[username]/completed/_components/challenges.tsx
index b1b4dd4d..02fcace7 100644
--- a/apps/web/src/app/(profile)/[username]/completed/_components/challenges.tsx
+++ b/apps/web/src/app/(profile)/[username]/completed/_components/challenges.tsx
@@ -1,11 +1,11 @@
'use client';
-import { useState } from 'react';
-import { ExploreCard, type ExploreCardProps } from '~/app/explore/_components/explore-card';
+import { cn } from '@repo/ui/cn';
import { Alert, AlertDescription, AlertTitle } from '@repo/ui/components/alert';
import { Button } from '@repo/ui/components/button';
import Link from 'next/link';
+import { useState } from 'react';
+import { ExploreCard, type ExploreCardProps } from '~/app/explore/_components/explore-card';
import { DIFFICULTY_COLOR_MAP, FilterBar, type FilterOptions } from './filter-bar';
-import { cn } from '@repo/ui/cn';
export function Challenges(props: {
challenges: (ExploreCardProps['challenge'] & { id: number; slug: string })[];
@@ -58,7 +58,7 @@ export function Challenges(props: {
}
key={c.id}
>
- <ExploreCard challenge={c} className="min-w-fit xl:min-w-fit" />
+ <ExploreCard challenge={c} />
</Link>
))}
</div>
diff --git a/packages/ui/src/components/avatar.tsx b/packages/ui/src/components/avatar.tsx
index 831803ea..b66e55ad 100644
--- a/packages/ui/src/components/avatar.tsx
+++ b/packages/ui/src/components/avatar.tsx
@@ -1,8 +1,8 @@
'use client';
-import * as React from 'react';
-import type { ComponentProps } from 'react';
import * as AvatarPrimitive from '@radix-ui/react-avatar';
+import type { ComponentProps } from 'react';
+import * as React from 'react';
import { cn } from '../cn';
const Avatar = React.forwardRef<
@@ -44,6 +44,7 @@ const AvatarFallback = React.forwardRef<
));
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
+// million-ignore
function DefaultAvatar(props: ComponentProps<'svg'>) {
return (
<svg
@@ -77,4 +78,4 @@ function DefaultAvatar(props: ComponentProps<'svg'>) {
);
}
-export { Avatar, AvatarImage, AvatarFallback, DefaultAvatar };
+export { Avatar, AvatarFallback, AvatarImage, DefaultAvatar };
diff --git a/packages/ui/src/components/default-avatar.tsx b/packages/ui/src/components/default-avatar.tsx
index 50081bd0..15642a47 100644
--- a/packages/ui/src/components/default-avatar.tsx
+++ b/packages/ui/src/components/default-avatar.tsx
@@ -1,5 +1,6 @@
import type { ComponentProps } from 'react';
+// million-ignore
export function DefaultAvatar(props: ComponentProps<'svg'>) {
return (
<svg