Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Refactor component styles for improved visual consistency and readability

Bill Yang66e396d04376
diff --git a/client/src/app/[site]/errors/components/ErrorDetails.tsx b/client/src/app/[site]/errors/components/ErrorDetails.tsx
index 52f3c6050..43e77b09b 100644
--- a/client/src/app/[site]/errors/components/ErrorDetails.tsx
+++ b/client/src/app/[site]/errors/components/ErrorDetails.tsx
@@ -68,7 +68,9 @@ function ErrorEventItem({ errorEvent }: { errorEvent: ErrorEvent }) {
{/* Header with timestamp and basic info */}
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-4">
- <span className="text-sm text-neutral-700 dark:text-neutral-200">{formatTimestamp(errorEvent.timestamp)}</span>
+ <span className="text-sm text-neutral-700 dark:text-neutral-200">
+ {formatTimestamp(errorEvent.timestamp)}
+ </span>
<div className="flex items-center gap-2">
{errorEvent.country && (
<Tooltip>
@@ -161,7 +163,9 @@ function ErrorEventItem({ errorEvent }: { errorEvent: ErrorEvent }) {
<TriangleAlert className="w-4 h-4 mt-0.5 flex-shrink-0" />
<div className="flex-1 min-w-0">
<p className="text-sm font-medium mb-1">Error</p>
- <p className="text-sm text-neutral-600 dark:text-neutral-300 break-words">{errorEvent.message || "No message available"}</p>
+ <p className="text-sm text-neutral-600 dark:text-neutral-300 break-words">
+ {errorEvent.message || "No message available"}
+ </p>
</div>
</div>
</div>
@@ -230,7 +234,10 @@ export function ErrorDetails({ errorMessage }: ErrorDetailsProps) {
<div className="p-4 bg-white dark:bg-neutral-900 border-t border-neutral-100 dark:border-neutral-800">
<div className="space-y-3">
{Array.from({ length: 3 }).map((_, index) => (
- <div key={index} className="border border-neutral-100 dark:border-neutral-800 rounded-lg p-4 bg-neutral-50 dark:bg-neutral-900/50">
+ <div
+ key={index}
+ className="border border-neutral-100 dark:border-neutral-800 rounded-lg p-4 bg-neutral-50 dark:bg-neutral-900/50"
+ >
{/* Header with timestamp and icons */}
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-4">
@@ -329,7 +336,7 @@ export function ErrorDetails({ errorMessage }: ErrorDetailsProps) {
)}
{totalCount > 0 && (
- <div className="text-center text-xs text-neutral-500 dark:text-gray-500 mt-2">
+ <div className="text-center text-xs text-neutral-500 dark:text-neutral-500 mt-2">
Showing {allErrorEvents.length} of {totalCount} error events
</div>
)}
diff --git a/client/src/app/[site]/errors/components/ErrorListItem.tsx b/client/src/app/[site]/errors/components/ErrorListItem.tsx
index f941068ed..86b5903b2 100644
--- a/client/src/app/[site]/errors/components/ErrorListItem.tsx
+++ b/client/src/app/[site]/errors/components/ErrorListItem.tsx
@@ -80,9 +80,9 @@ export function ErrorListItem({ errorData }: ErrorListItemProps) {
{/* Expand/Collapse icon */}
<div className="ml-2 flex-shrink-0 flex">
{expanded ? (
- <ChevronDown className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
+ <ChevronDown className="w-4 h-4 text-neutral-500 dark:text-neutral-400" strokeWidth={3} />
) : (
- <ChevronRight className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
+ <ChevronRight className="w-4 h-4 text-neutral-500 dark:text-neutral-400" strokeWidth={3} />
)}
</div>
</div>
diff --git a/client/src/app/[site]/goals/components/GoalFormModal.tsx b/client/src/app/[site]/goals/components/GoalFormModal.tsx
index 7354b026b..c26088ee2 100644
--- a/client/src/app/[site]/goals/components/GoalFormModal.tsx
+++ b/client/src/app/[site]/goals/components/GoalFormModal.tsx
@@ -295,7 +295,7 @@ export default function GoalFormModal({ siteId, goal, trigger, isCloneMode = fal
/>
</FormControl>
<FormMessage />
- <div className="text-xs text-gray-500 mt-1">
+ <div className="text-xs text-neutral-500 mt-1">
Use * to match a single path segment. Use ** to match across segments.
</div>
</FormItem>
diff --git a/client/src/app/[site]/realtime/RealtimeEvents/RealtimeEvents.tsx b/client/src/app/[site]/realtime/RealtimeEvents/RealtimeEvents.tsx
index 327ebeb87..f9471bca7 100644
--- a/client/src/app/[site]/realtime/RealtimeEvents/RealtimeEvents.tsx
+++ b/client/src/app/[site]/realtime/RealtimeEvents/RealtimeEvents.tsx
@@ -115,7 +115,7 @@ function EventCard({ event }: { event: Event }) {
{/* <div className="flex items-center ml-3 flex-1 min-w-0">
<Tooltip>
<TooltipTrigger asChild>
- <span className="text-xs text-gray-400 truncate max-w-[200px] inline-block">
+ <span className="text-xs text-neutral-400 truncate max-w-[200px] inline-block">
{truncatePath(
isPageview && event.page_title
? event.page_title
@@ -134,8 +134,8 @@ function EventCard({ event }: { event: Event }) {
</div> */}
{/* Time information */}
- <div className="flex items-center text-xs text-gray-300">
- <span className="text-gray-400">{eventTime.toRelative()}</span>
+ <div className="flex items-center text-xs text-neutral-300">
+ <span className="text-neutral-400">{eventTime.toRelative()}</span>
</div>
</div>
</div>
@@ -151,7 +151,7 @@ export function RealtimeEvents() {
}
if (!data || data.length === 0) {
- return <div className="text-sm text-gray-400 p-4 text-center">No events recorded yet</div>;
+ return <div className="text-sm text-neutral-400 p-4 text-center">No events recorded yet</div>;
}
return (
diff --git a/client/src/app/[site]/realtime/page.tsx b/client/src/app/[site]/realtime/page.tsx
index 10e6b525d..9e4fef0d6 100644
--- a/client/src/app/[site]/realtime/page.tsx
+++ b/client/src/app/[site]/realtime/page.tsx
@@ -30,7 +30,7 @@ export default function RealtimePage() {
<MobileSidebar />
<div className="flex flex-col p-2 md:p-3 bg-neutral-900 rounded-lg shadow-lg border border-neutral-750 w-[300px] md:w-[400px]">
<div className="p-2">
- <div className="text-sm text-gray-400 flex gap-2 text-nowrap items-center">
+ <div className="text-sm text-neutral-400 flex gap-2 text-nowrap items-center">
<div className="flex justify-center">
<span className="relative flex h-3 w-3">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-400 opacity-75"></span>
diff --git a/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx b/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx
index 183fcff9d..7d0c7d036 100644
--- a/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx
+++ b/client/src/app/[site]/replay/components/ReplayBreadcrumbs.tsx
@@ -151,7 +151,7 @@ export function ReplayBreadcrumbs() {
const eventInfo = EVENT_TYPE_INFO[eventTypeStr as keyof typeof EVENT_TYPE_INFO] || {
name: `Unknown (${eventTypeStr})`,
icon: Globe,
- color: "text-gray-400",
+ color: "text-neutral-400",
};
// For incremental snapshots, get more detail
@@ -224,7 +224,7 @@ export function ReplayBreadcrumbs() {
const getEventColor = (event: any) => {
const eventTypeStr = String(event.type);
const eventInfo = EVENT_TYPE_INFO[eventTypeStr as keyof typeof EVENT_TYPE_INFO];
- return eventInfo?.color || "text-gray-400";
+ return eventInfo?.color || "text-neutral-400";
};
if (isLoading || !data?.events) {
@@ -294,7 +294,9 @@ export function ReplayBreadcrumbs() {
</div>
<Icon className={cn("w-4 h-4 flex-shrink-0", color)} />
<div className="flex-1 min-w-0">
- <div className="text-xs text-neutral-900 dark:text-neutral-200 font-medium truncate">{description}</div>
+ <div className="text-xs text-neutral-900 dark:text-neutral-200 font-medium truncate">
+ {description}
+ </div>
{group.count > 1 && durationMs > 0 && (
<div className="text-xs text-neutral-500 dark:text-neutral-500 mt-0.5">
{Duration.fromMillis(durationMs).toFormat("s.SSS")}s duration
@@ -302,7 +304,9 @@ export function ReplayBreadcrumbs() {
)}
</div>
{group.count > 5 && (
- <div className="text-xs text-neutral-700 dark:text-neutral-500 bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 rounded">{group.count}</div>
+ <div className="text-xs text-neutral-700 dark:text-neutral-500 bg-neutral-100 dark:bg-neutral-800 px-1.5 py-0.5 rounded">
+ {group.count}
+ </div>
)}
</div>
);
diff --git a/client/src/app/[site]/replay/components/ReplayCard.tsx b/client/src/app/[site]/replay/components/ReplayCard.tsx
index cd8713a4d..dddee943e 100644
--- a/client/src/app/[site]/replay/components/ReplayCard.tsx
+++ b/client/src/app/[site]/replay/components/ReplayCard.tsx
@@ -105,7 +105,7 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
variant="ghost"
size="sm"
className="ml-auto opacity-0 group-hover:opacity-100 transition-opacity h-6 w-6 p-0 hover:bg-red-500/20 hover:text-red-400"
- onClick={(e) => {
+ onClick={e => {
e.stopPropagation();
setIsDialogOpen(true);
}}
@@ -113,7 +113,7 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
<Trash2 className="w-3 h-3" />
</Button>
</AlertDialogTrigger>
- <AlertDialogContent onClick={(e) => e.stopPropagation()}>
+ <AlertDialogContent onClick={e => e.stopPropagation()}>
<AlertDialogHeader>
<AlertDialogTitle>Delete Session Replay</AlertDialogTitle>
<AlertDialogDescription>
@@ -122,10 +122,10 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancel onClick={(e) => e.stopPropagation()}>Cancel</AlertDialogCancel>
+ <AlertDialogCancel onClick={e => e.stopPropagation()}>Cancel</AlertDialogCancel>
<AlertDialogAction
variant="destructive"
- onClick={(e) => {
+ onClick={e => {
e.stopPropagation();
handleDelete();
}}
@@ -155,7 +155,10 @@ export function ReplayCard({ replay }: { replay: SessionReplayListItem }) {
screen_height={replay.screen_height}
/>
- <Badge variant="outline" className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-gray-300">
+ <Badge
+ variant="outline"
+ className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-neutral-300"
+ >
<MousePointerClick className="w-4 h-4 text-amber-500" />
<span>{formatter(replay.event_count)}</span>
</Badge>
diff --git a/client/src/app/settings/account/page.tsx b/client/src/app/settings/account/page.tsx
index bb060c997..ba4281da6 100644
--- a/client/src/app/settings/account/page.tsx
+++ b/client/src/app/settings/account/page.tsx
@@ -10,7 +10,7 @@ export default function AccountPage() {
<>
<div className="mb-4">
<h1 className="text-3xl font-bold tracking-tight">Account Settings</h1>
- <p className="text-gray-500 dark:text-gray-400">Manage your personal account settings</p>
+ <p className="text-neutral-500 dark:text-neutral-400">Manage your personal account settings</p>
</div>
<AccountInner />
</>
diff --git a/client/src/app/settings/organization/layout.tsx b/client/src/app/settings/organization/layout.tsx
index c0e370971..751756ef2 100644
--- a/client/src/app/settings/organization/layout.tsx
+++ b/client/src/app/settings/organization/layout.tsx
@@ -30,7 +30,7 @@ export default function OrganizationLayout({ children }: { children: React.React
<div className="space-y-5">
<div>
<h1 className="text-3xl font-bold tracking-tight">Organization Settings</h1>
- <p className="text-gray-500 dark:text-gray-400">Manage your organization settings and members</p>
+ <p className="text-neutral-500 dark:text-neutral-400">Manage your organization settings and members</p>
</div>
<div className="flex items-center gap-2">
diff --git a/client/src/components/Channel.tsx b/client/src/components/Channel.tsx
index e602088fb..12b6d4326 100644
--- a/client/src/components/Channel.tsx
+++ b/client/src/components/Channel.tsx
@@ -21,37 +21,37 @@ import { Favicon } from "./Favicon";
export const getChannelIcon = (channel: string) => {
switch (channel) {
case "Direct":
- return <Link className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Link className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Organic Search":
- return <Search className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Search className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Referral":
- return <ExternalLink className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <ExternalLink className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Organic Social":
- return <Users className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Users className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Email":
- return <Mail className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Mail className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Unknown":
- return <HelpCircle className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <HelpCircle className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Paid Search":
- return <Search className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Search className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Paid Unknown":
- return <DollarSign className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <DollarSign className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Paid Social":
- return <Users className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Users className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Display":
- return <Monitor className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Monitor className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Organic Video":
- return <Video className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Video className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Affiliate":
- return <Handshake className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Handshake className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Content":
- return <FileText className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <FileText className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Organic Shopping":
- return <ShoppingCart className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <ShoppingCart className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Event":
- return <Calendar className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Calendar className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
case "Audio":
- return <Headphones className="w-4 h-4 text-neutral-500 dark:text-gray-400" />;
+ return <Headphones className="w-4 h-4 text-neutral-500 dark:text-neutral-400" />;
default:
return null;
}
@@ -139,7 +139,7 @@ export function Channel({ channel, referrer }: { channel: string; referrer: stri
if (domain) {
const displayName = getDisplayName(domain);
return (
- <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-neutral-300">
<Favicon domain={domain} className="w-4 h-4" />
<span>{displayName}</span>
</Badge>
@@ -147,7 +147,7 @@ export function Channel({ channel, referrer }: { channel: string; referrer: stri
}
return (
- <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-neutral-300">
{getChannelIcon(channel)}
<span>{channel}</span>
</Badge>
diff --git a/client/src/components/CopyText.tsx b/client/src/components/CopyText.tsx
index f9801ca83..a8e56bb2f 100644
--- a/client/src/components/CopyText.tsx
+++ b/client/src/components/CopyText.tsx
@@ -61,7 +61,7 @@ export function CopyText({
<button
onClick={handleCopy}
className={cn(
- "p-1 rounded-md transition-colors text-gray-400 hover:text-gray-200 hover:bg-neutral-800 focus:outline-none",
+ "p-1 rounded-md transition-colors text-neutral-400 hover:text-neutral-200 hover:bg-neutral-800 focus:outline-none",
copyButtonClassName
)}
aria-label="Copy to clipboard"
diff --git a/client/src/components/Sessions/SessionCard.tsx b/client/src/components/Sessions/SessionCard.tsx
index f1a1dd07d..624347d5b 100644
--- a/client/src/components/Sessions/SessionCard.tsx
+++ b/client/src/components/Sessions/SessionCard.tsx
@@ -78,7 +78,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
/>
<Tooltip>
<TooltipTrigger asChild>
- <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-neutral-300">
<PageviewIcon />
<span>{formatter(session.pageviews)}</span>
</Badge>
@@ -87,7 +87,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
- <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-gray-300">
+ <Badge className="flex items-center gap-1 bg-neutral-100 dark:bg-neutral-800 text-neutral-600 dark:text-neutral-300">
<EventIcon />
<span>{formatter(session.events)}</span>
</Badge>
@@ -101,7 +101,7 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
<div className="items-center ml-3 flex-1 min-w-0 hidden md:flex">
<Tooltip>
<TooltipTrigger asChild>
- <span className="text-xs text-neutral-500 dark:text-gray-400 truncate max-w-[200px] inline-block">
+ <span className="text-xs text-neutral-500 dark:text-neutral-400 truncate max-w-[200px] inline-block">
{truncatePath(session.entry_page)}
</span>
</TooltipTrigger>
@@ -110,11 +110,11 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
</TooltipContent>
</Tooltip>
- <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-neutral-500 dark:text-gray-400" />
+ <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-neutral-500 dark:text-neutral-400" />
<Tooltip>
<TooltipTrigger asChild>
- <span className="text-xs text-neutral-500 dark:text-gray-400 truncate max-w-[200px] inline-block">
+ <span className="text-xs text-neutral-500 dark:text-neutral-400 truncate max-w-[200px] inline-block">
{truncatePath(session.exit_page)}
</span>
</TooltipTrigger>
@@ -126,8 +126,8 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
{/* Time information */}
- <div className="flex items-center gap-1.5 text-xs text-neutral-600 dark:text-gray-300">
- <span className="text-neutral-500 dark:text-gray-400">
+ <div className="flex items-center gap-1.5 text-xs text-neutral-600 dark:text-neutral-300">
+ <span className="text-neutral-500 dark:text-neutral-400">
{DateTime.fromSQL(session.session_start, {
zone: "utc",
})
@@ -135,16 +135,16 @@ export function SessionCard({ session, onClick, userId, expandedByDefault }: Ses
.toLocal()
.toFormat(hour12 ? "MMM d, h:mm a" : "dd MMM, HH:mm")}
</span>
- <span className="text-neutral-500 dark:text-gray-400">•</span>
+ <span className="text-neutral-500 dark:text-neutral-400">•</span>
<span className="hidden md:block">{duration}</span>
</div>
{/* Expand/Collapse icon */}
<div className="ml-2 flex-shrink-0 hidden md:flex">
{expanded ? (
- <ChevronDown className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
+ <ChevronDown className="w-4 h-4 text-neutral-500 dark:text-neutral-400" strokeWidth={3} />
) : (
- <ChevronRight className="w-4 h-4 text-neutral-500 dark:text-gray-400" strokeWidth={3} />
+ <ChevronRight className="w-4 h-4 text-neutral-500 dark:text-neutral-400" strokeWidth={3} />
)}
</div>
</div>
@@ -207,14 +207,14 @@ export const SessionCardSkeleton = memo(() => {
{/* Entry/Exit paths with randomized widths */}
<div className="items-center ml-3 flex-1 min-w-0 hidden md:flex">
<Skeleton className={cn("h-3 max-w-[200px]", getRandomWidth())} />
- <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-neutral-500 dark:text-gray-400 opacity-20" />
+ <ArrowRight className="mx-2 w-3 h-3 flex-shrink-0 text-neutral-500 dark:text-neutral-400 opacity-20" />
<Skeleton className={cn("h-3 max-w-[200px]", getRandomWidth())} />
</div>
{/* Time information */}
<div className="flex items-center gap-1.5">
<Skeleton className={cn("h-3", getRandomTimeWidth())} />
- <span className="text-neutral-500 dark:text-gray-400 opacity-20">•</span>
+ <span className="text-neutral-500 dark:text-neutral-400 opacity-20">•</span>
<Skeleton className={cn("h-3 hidden md:block", getRandomDurationWidth())} />
</div>
diff --git a/client/src/components/subscription/PaidPlain/PaidPlan.tsx b/client/src/components/subscription/PaidPlain/PaidPlan.tsx
index 7af7b1fc2..2c9794418 100644
--- a/client/src/components/subscription/PaidPlain/PaidPlan.tsx
+++ b/client/src/components/subscription/PaidPlain/PaidPlan.tsx
@@ -145,7 +145,7 @@ export function PaidPlan() {
<div className="flex justify-between items-start">
<div className="space-y-1">
<p className="text-3xl font-bold">{currentPlanDetails?.name || activeSubscription.planName} </p>
- <p className="text text-neutral-600 dark:text-gray-300">
+ <p className="text text-neutral-600 dark:text-neutral-300">
{getFormattedPrice()} • {activeSubscription.eventLimit.toLocaleString()} events
</p>
{isAnnualPlan && (
diff --git a/docs/src/components/TweetClient.tsx b/docs/src/components/TweetClient.tsx
index bc53c68aa..89d01dc3d 100644
--- a/docs/src/components/TweetClient.tsx
+++ b/docs/src/components/TweetClient.tsx
@@ -29,12 +29,7 @@ const Twitter = ({ className, ...props }: TwitterIconProps) => (
);
const Verified = ({ className, ...props }: TwitterIconProps) => (
- <svg
- aria-label="Verified Account"
- viewBox="0 0 24 24"
- className={cn(className)}
- {...props}
- >
+ <svg aria-label="Verified Account" viewBox="0 0 24 24" className={cn(className)} {...props}>
<g fill="currentColor">
<path d="M22.5 12.5c0-1.58-.875-2.95-2.148-3.6.154-.435.238-.905.238-1.4 0-2.21-1.71-3.998-3.818-3.998-.47 0-.92.084-1.336.25C14.818 2.415 13.51 1.5 12 1.5s-2.816.917-3.437 2.25c-.415-.165-.866-.25-1.336-.25-2.11 0-3.818 1.79-3.818 4 0 .494.083.964.237 1.4-1.272.65-2.147 2.018-2.147 3.6 0 1.495.782 2.798 1.942 3.486-.02.17-.032.34-.032.514 0 2.21 1.708 4 3.818 4 .47 0 .92-.086 1.335-.25.62 1.334 1.926 2.25 3.437 2.25 1.512 0 2.818-.916 3.437-2.25.415.163.865.248 1.336.248 2.11 0 3.818-1.79 3.818-4 0-.174-.012-.344-.033-.513 1.158-.687 1.943-1.99 1.943-3.484zm-6.616-3.334l-4.334 6.5c-.145.217-.382.334-.625.334-.143 0-.288-.04-.416-.126l-.115-.094-2.415-2.415c-.293-.293-.293-.768 0-1.06s.768-.294 1.06 0l1.77 1.767 3.825-5.74c.23-.345.696-.436 1.04-.207.346.23.44.696.21 1.04z" />
</g>
@@ -59,8 +54,10 @@ export const TweetHeader = ({ tweet }: { tweet: EnrichedTweet }) => {
src={tweet.user.profile_image_url_https}
className="overflow-hidden rounded-full border border-transparent"
loading="lazy"
- onError={(e) => {
- e.currentTarget.src = `https://ui-avatars.com/api/?name=${encodeURIComponent(tweet.user.name)}&background=1a1a1a&color=fff&size=48`;
+ onError={e => {
+ e.currentTarget.src = `https://ui-avatars.com/api/?name=${encodeURIComponent(
+ tweet.user.name
+ )}&background=1a1a1a&color=fff&size=48`;
}}
/>
</a>
@@ -73,16 +70,14 @@ export const TweetHeader = ({ tweet }: { tweet: EnrichedTweet }) => {
>
{truncate(tweet.user.name, 20)}
{tweet.user.verified ||
- (tweet.user.is_blue_verified && (
- <Verified className="ml-1 inline size-4 text-blue-500" />
- ))}
+ (tweet.user.is_blue_verified && <Verified className="ml-1 inline size-4 text-blue-500" />)}
</a>
<div className="flex items-center space-x-1">
<a
href={tweet.user.url}
target="_blank"
rel="noreferrer"
- className="text-sm text-gray-500 transition-all duration-75"
+ className="text-sm text-neutral-500 transition-all duration-75"
>
@{truncate(tweet.user.screen_name, 16)}
</a>
@@ -111,19 +106,13 @@ export const TweetBody = ({ tweet }: { tweet: EnrichedTweet }) => (
href={entity.href}
target="_blank"
rel="noopener noreferrer"
- className="text-sm font-normal text-gray-500"
+ className="text-sm font-normal text-neutral-500"
>
<span>{entity.text}</span>
</a>
);
case "text":
- return (
- <span
- key={idx}
- className="text-sm font-normal"
- dangerouslySetInnerHTML={{ __html: entity.text }}
- />
- );
+ return <span key={idx} className="text-sm font-normal" dangerouslySetInnerHTML={{ __html: entity.text }} />;
}
})}
</div>
@@ -134,14 +123,7 @@ export const TweetMedia = ({ tweet }: { tweet: EnrichedTweet }) => {
return (
<div className="flex flex-1 items-center justify-center">
{tweet.video && (
- <video
- poster={tweet.video.poster}
- autoPlay
- loop
- muted
- playsInline
- className="rounded-xl border shadow-sm"
- >
+ <video poster={tweet.video.poster} autoPlay loop muted playsInline className="rounded-xl border shadow-sm">
<source src={tweet.video.variants[0].src} type="video/mp4" />
Your browser does not support the video tag.
</video>
@@ -149,7 +131,7 @@ export const TweetMedia = ({ tweet }: { tweet: EnrichedTweet }) => {
{tweet.photos && (
<div className="relative flex transform-gpu snap-x snap-mandatory gap-4 overflow-x-auto">
<div className="shrink-0 snap-center sm:w-2" />
- {tweet.photos.map((photo) => (
+ {tweet.photos.map(photo => (
<img
key={photo.url}
src={photo.url}
@@ -176,4 +158,4 @@ export const TweetMedia = ({ tweet }: { tweet: EnrichedTweet }) => {
)}
</div>
);
-};
\ No newline at end of file
+};