The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
improve logs table/filters
Steven Tey9dfb5bced306
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page-client.tsxindex 80f15e64da..cce5f3acde 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page-client.tsx@@ -11,11 +11,13 @@ import { CopyButton, StatusBadge, TimestampTooltip } from "@dub/ui";import { ChevronRight, StackY3 } from "@dub/ui/icons";import { fetcher, formatDateTime } from "@dub/utils";import Link from "next/link";+import { useParams } from "next/navigation";import { useEffect, useState } from "react";import type { HighlighterCore } from "shiki";import useSWR from "swr";-export function LogDetailPageClient({ logId }: { logId: string }) {+export function LogDetailPageClient() {+ const { logId } = useParams();const { id: workspaceId, slug } = useWorkspace();const {diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page.tsxindex 3af8795853..5429420805 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/[logId]/page.tsx@@ -1,9 +1,5 @@import { LogDetailPageClient } from "./page-client";-export default async function LogDetailPage(props: {- params: Promise<{ logId: string }>;-}) {- const params = await props.params;-- return <LogDetailPageClient logId={params.logId} />;+export default function LogDetailPage() {+ return <LogDetailPageClient />;}diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/page-client.tsxdeleted file mode 100644index 8e3284f3d7..0000000000--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/page-client.tsx+++ /dev/null@@ -1,7 +0,0 @@-"use client";--import { LogsTable } from "@/ui/logs/logs-table";--export function LogsPageClient() {- return <LogsTable />;-}diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/page.tsxindex 2a21a828be..f90ca68337 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/logs/page.tsx@@ -1,6 +1,6 @@import { PageContent } from "@/ui/layout/page-content";import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper";-import { LogsPageClient } from "./page-client";+import { LogsTable } from "@/ui/logs/logs-table";export default function LogsPage() {return (@@ -12,7 +12,7 @@ export default function LogsPage() {}}><PageWidthWrapper>- <LogsPageClient />+ <LogsTable /></PageWidthWrapper></PageContent>);diff --git a/apps/web/lib/auth/options.ts b/apps/web/lib/auth/options.tsindex ace8024fc4..9f1729205f 100644--- a/apps/web/lib/auth/options.ts+++ b/apps/web/lib/auth/options.ts@@ -350,8 +350,6 @@ export const authOptions: NextAuthOptions = {},callbacks: {signIn: async ({ user, account, profile }) => {- console.log({ user, account, profile });-if (!user.email || (await isBlacklistedEmail(user.email))) {return false;}@@ -560,7 +558,6 @@ export const authOptions: NextAuthOptions = {},events: {async signIn(message) {- console.log("signIn", message);const email = message.user.email as string;const user = await prisma.user.findUnique({where: { email },diff --git a/apps/web/ui/logs/use-log-filters.ts b/apps/web/ui/logs/use-log-filters.tsindex 6ce4c0aaf3..fabaa931dd 100644--- a/apps/web/ui/logs/use-log-filters.ts+++ b/apps/web/ui/logs/use-log-filters.ts@@ -1,7 +1,7 @@"use client";import {- HTTP_METHODS,+ HTTP_MUTATION_METHODS,HTTP_STATUS_CODES,REQUEST_TYPES,} from "@/lib/api-logs/constants";@@ -88,7 +88,7 @@ export function useLogFilters() {key: "method",icon: ArrowsOppositeDirectionX,label: "Method",- options: HTTP_METHODS.map((m) => ({+ options: HTTP_MUTATION_METHODS.map((m) => ({value: m,label: m,})),