The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix mobile styles
Steven Teyffbdfab8d18a
diff --git a/apps/web/ui/webhooks/webhook-events.tsx b/apps/web/ui/webhooks/webhook-events.tsxindex b958e338e5..63d8ffcce0 100644--- a/apps/web/ui/webhooks/webhook-events.tsx+++ b/apps/web/ui/webhooks/webhook-events.tsx@@ -1,7 +1,7 @@"use client";import { WebhookEventProps } from "@/lib/types";-import { Sheet, SheetContent, SheetTrigger } from "@dub/ui";+import { Sheet, SheetContent, SheetTrigger, useMediaQuery } from "@dub/ui";import { CircleCheck, CircleHalfDottedClock, Copy } from "@dub/ui/src/icons";import { ButtonTooltip, Tooltip } from "@dub/ui/src/tooltip";import { PropsWithChildren, useEffect, useState } from "react";@@ -48,6 +48,7 @@ const WebhookEvent = ({ event }: { event: WebhookEventProps }) => {}, [highlighter, event]);const isSuccess = event.http_status >= 200 && event.http_status < 300;+ const { isMobile } = useMediaQuery();return (<Sheet>@@ -81,7 +82,9 @@ const WebhookEvent = ({ event }: { event: WebhookEventProps }) => {const localDate = new Date(date.getTime() - date.getTimezoneOffset() * 60000,);- return localDate.toLocaleTimeString();+ return isMobile+ ? localDate.toLocaleTimeString()+ : localDate.toLocaleString();})()}</div></button>diff --git a/apps/web/ui/webhooks/webhook-header.tsx b/apps/web/ui/webhooks/webhook-header.tsxindex 17c03fd30c..05e2955ada 100644--- a/apps/web/ui/webhooks/webhook-header.tsx+++ b/apps/web/ui/webhooks/webhook-header.tsx@@ -64,25 +64,28 @@ export default function WebhookHeader({ webhookId }: { webhookId: string }) {<ChevronLeft className="size-4" /><p className="text-sm font-medium text-gray-500">Back to webhooks</p></Link>- <div className="flex items-center justify-between gap-2">- {isLoading ? (- <div className="flex items-center gap-x-3">- <div className="rounded-md border border-gray-200 bg-gradient-to-t from-gray-100 p-2">+ <div className="flex justify-between gap-2 sm:items-center">+ {isLoading || !webhook ? (+ <div className="flex flex-col gap-3 sm:flex-row sm:items-center">+ <div className="w-fit flex-none rounded-md border border-gray-200 bg-gradient-to-t from-gray-100 p-2"><TokenAvatar id="placeholder-oauth-app" className="size-8" /></div><div className="flex flex-col gap-2">- <div className="h-3 w-20 rounded-full bg-gray-100"></div>- <div className="h-3 w-80 rounded-full bg-gray-100"></div>+ <div className="h-5 w-28 rounded-full bg-gray-100"></div>+ <div className="h-3 w-48 rounded-full bg-gray-100"></div>+ <div className="h-3 w-40 rounded-full bg-gray-100"></div></div></div>) : (- <div className="flex items-center gap-x-3">- <div className="rounded-md border border-gray-200 bg-gradient-to-t from-gray-100 p-2">- <TokenAvatar id={webhook?.name!} className="size-8" />+ <div className="flex flex-col gap-3 sm:flex-row sm:items-center">+ <div className="w-fit flex-none rounded-md border border-gray-200 bg-gradient-to-t from-gray-100 p-2">+ <TokenAvatar id={webhook.id} className="size-8" /></div><div>- <p className="font-semibold text-gray-700">{webhook?.name}</p>- <p className="text-sm text-gray-500">{webhook?.url}</p>+ <p className="font-semibold text-gray-700">{webhook.name}</p>+ <p className="text-pretty text-sm text-gray-500">+ {webhook.url}+ </p></div></div>)}