Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Responsiveness issue of ratelimit page #2710

Merged
merged 7 commits into from
Dec 10, 2024
4 changes: 2 additions & 2 deletions apps/dashboard/app/(app)/ratelimits/[namespaceId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default async function RatelimitNamespacePage(props: {

<div className="flex items-center justify-between w-full">
<div>
<h2 className="text-2xl font-semibold leading-none tracking-tight whitespace-nowrap">
<h2 className="text-2xl font-semibold leading-none tracking-tight whitespace-nowrap hidden sm:block">
Requests
</h2>
</div>
Expand Down Expand Up @@ -213,7 +213,7 @@ export default async function RatelimitNamespacePage(props: {
<EmptyPlaceholder.Description>
Ratelimit something or change the range
</EmptyPlaceholder.Description>
<Code className="flex items-start gap-8 p-4 my-8 text-xs text-left">
<Code className="flex items-start gap-0 sm:gap-8 p-4 my-8 text-xs sm:text-xxs text-start overflow-x-auto max-w-full">
{snippet}
<CopyButton value={snippet} />
</Code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function EmptyPlaceholder({
)}
{...props}
>
<div className="mx-auto flex max-w-[420px] flex-col items-center justify-center text-center">
<div className="overflow-hidden w-full max-w-full flex flex-col items-center justify-center text-center">
{children}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/components/ui/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type * as React from "react";
import { cn } from "@/lib/utils";

const codeVariants = cva(
"inlineflex font-mono items-center rounded-md border border-border bg-transparent px-2.5 py-2 text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
"inline-flex font-mono items-center rounded-md border border-border bg-transparent px-2.5 py-2 text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {
Expand Down
Loading