Skip to content

Commit 13cbac7

Browse files
samejrericallam
authored andcommitted
Use simplr library for plurals and flex wrap the heading info nicely
1 parent 8f6a94f commit 13cbac7

File tree

1 file changed

+6
-6
lines changed
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.streams.$streamKey

1 file changed

+6
-6
lines changed

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.streams.$streamKey/route.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import { Clipboard, ClipboardCheck } from "lucide-react";
99
import { type LoaderFunctionArgs } from "@remix-run/server-runtime";
1010
import { useCallback, useEffect, useRef, useState } from "react";
11+
import simplur from "simplur";
1112
import { Paragraph } from "~/components/primitives/Paragraph";
1213
import {
1314
Tooltip,
@@ -178,14 +179,14 @@ export function RealtimeStreamViewer({
178179
.length;
179180

180181
return (
181-
<div className="flex h-full flex-col overflow-hidden">
182+
<div className="flex h-full flex-col overflow-hidden border-t border-grid-bright">
182183
{/* Header */}
183-
<div className="flex items-center justify-between border-b border-grid-bright bg-background-bright px-3 py-2">
184+
<div className="flex flex-wrap items-center justify-between gap-2 border-b border-grid-bright bg-background-bright px-3 py-3">
184185
<Paragraph variant="small/bright" className="mb-0">
185186
Stream: <span className="font-mono text-text-dimmed">{streamKey}</span>
186187
</Paragraph>
187-
<div className="flex items-center gap-3">
188-
<div className="flex items-center gap-1.5">
188+
<div className="flex flex-wrap items-center gap-3">
189+
<div className="flex flex-wrap items-center gap-2.5">
189190
<div className="flex items-center gap-1">
190191
{isConnected ? (
191192
<BoltIcon className={cn("size-3.5 animate-pulse text-success")} />
@@ -196,9 +197,8 @@ export function RealtimeStreamViewer({
196197
{isConnected ? "Connected" : "Disconnected"}
197198
</Paragraph>
198199
</div>
199-
<div className="size-1 rounded-full bg-text-dimmed/50" />
200200
<Paragraph variant="small" className="mb-0">
201-
{chunks.length} {chunks.length === 1 ? "chunk" : "chunks"}
201+
{simplur`${chunks.length} chunk[|s]`}
202202
</Paragraph>
203203
</div>
204204
<TooltipProvider>

0 commit comments

Comments
 (0)