Skip to content

Commit

Permalink
style: 馃拕 minor UI changes and removed harcoded value
Browse files Browse the repository at this point in the history
  • Loading branch information
growupanand committed Feb 14, 2024
1 parent 0adb281 commit c183e64
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function ResponseUsageCard({ organizationId }: Readonly<Props>) {
}

if (data) {
const usage = 200;
const usage = data;
const maximum = formSubmissionLimit;
const usagePercentage = (usage / maximum) * 100;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function FormPageHeader({ formId }: Props) {
}

return (
<div className="sticky top-0 z-50 border-b bg-white/70 p-3 shadow-sm backdrop-blur">
<div className="sticky top-0 z-50 border-b bg-white/70 p-3 backdrop-blur">
<div className="flex items-center justify-between ">
<div
className={cn(
Expand Down Expand Up @@ -55,7 +55,7 @@ function FormPageHeader({ formId }: Props) {
<ChevronRight size={20} />
<ChangeNameInput
form={data}
className="w-full text-xl font-medium"
className="w-full text-lg font-medium"
/>
</>
) : (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Conversation } from "@convoform/db";
import { Card, CardContent } from "@convoform/ui/components/ui/card";
import { Skeleton } from "@convoform/ui/components/ui/skeleton";

import { timeAgo } from "@/lib/utils";
Expand Down Expand Up @@ -41,17 +40,22 @@ export function ConversationsNavigation({
}

const ConversationsCardSkelton = () => (
<Card className="border-0 bg-transparent shadow-none">
<CardContent className="pt-6">
<h3 className="mb-5 px-4 text-lg font-semibold tracking-tight">
<Skeleton className="h-5 w-20" />
</h3>
<nav className="flex flex-col gap-1">
<Skeleton className="h-[40px] w-full" />
<Skeleton className="h-[40px] w-full" />
</nav>
</CardContent>
</Card>
<div>
<nav className="grid gap-1">
<div className="flex h-[40px] w-full items-center justify-between ps-3">
<Skeleton className="h-[15px] w-[80px]" />
<Skeleton className="h-[15px] w-[40px]" />
</div>
<div className="flex h-[40px] w-full items-center justify-between ps-3">
<Skeleton className="h-[15px] w-[80px]" />
<Skeleton className="h-[15px] w-[40px]" />
</div>
<div className="flex h-[40px] w-full items-center justify-between ps-3">
<Skeleton className="h-[15px] w-[80px]" />
<Skeleton className="h-[15px] w-[40px]" />
</div>
</nav>
</div>
);

ConversationsNavigation.ConversationsCardSkelton = ConversationsCardSkelton;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SheetContent,
SheetTrigger,
} from "@convoform/ui/components/ui/sheet";
import { List } from "lucide-react";
import { GanttChartSquare, List } from "lucide-react";

import { SecondaryNavigation } from "@/components/common/secondaryNavigation";
import { api } from "@/trpc/react";
Expand Down Expand Up @@ -68,7 +68,18 @@ export default function ConversationsSidebar({ formId }: Props) {
<div className="mb-3">
<SecondaryNavigation
items={[
{ href: `/forms/${formId}/conversations`, title: "Overview" },
{
href: `/forms/${formId}/conversations`,
title: (
<div className="flex w-full items-center justify-between">
<span className="text-lg">Overview</span>
<GanttChartSquare
className="text-muted-foreground"
size={20}
/>
</div>
),
},
]}
/>
</div>
Expand All @@ -93,7 +104,15 @@ export default function ConversationsSidebar({ formId }: Props) {
items={[
{
href: `/forms/${formId}/conversations`,
title: "Overview",
title: (
<div className="flex w-full items-center justify-between">
<span className="text-lg">Overview</span>
<GanttChartSquare
className="text-muted-foreground"
size={20}
/>
</div>
),
},
]}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(protectedPage)/forms/[formId]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Layout({
params: { formId },
}: Readonly<Props>) {
return (
<div className="relative flex h-screen flex-col ">
<div className="relative flex h-screen flex-col gap-3 ">
<FormEditorPageHeader formId={formId} />
<div className="grow">{children}</div>
</div>
Expand Down

0 comments on commit c183e64

Please sign in to comment.