From 93694ad676cd3367317bbbd51bdbd5517a01e570 Mon Sep 17 00:00:00 2001 From: ruru <142723369+ruru-m07@users.noreply.github.com> Date: Sat, 11 May 2024 11:57:37 +0530 Subject: [PATCH] refactor(ui): significant UI updates --- app/layout.tsx | 19 ++- app/page.tsx | 50 +++---- components/{suggestions.json => data.json} | 24 +++- components/emptyScreen.tsx | 41 +++--- components/listSuggestion.tsx | 4 +- components/loader.tsx | 2 +- components/md-components.tsx | 59 +++------ components/md/copy-button.tsx | 144 +-------------------- components/notificationBanner.tsx | 85 ++++++++++++ components/ui/dialog.tsx | 116 +++++++++++++++++ components/ui/spinner.tsx | 38 ++++++ package.json | 1 + pnpm-lock.yaml | 37 ++++++ tailwind.config.ts | 5 + 14 files changed, 392 insertions(+), 233 deletions(-) rename components/{suggestions.json => data.json} (64%) create mode 100644 components/notificationBanner.tsx create mode 100644 components/ui/dialog.tsx create mode 100644 components/ui/spinner.tsx diff --git a/app/layout.tsx b/app/layout.tsx index 6e2fe22..c2f5786 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -10,6 +10,7 @@ import { buttonVariants } from "@/components/ui/button"; import { GitHubLogoIcon } from "@radix-ui/react-icons"; import { ModeToggle } from "@/components/modeToggle"; import Image from "next/image"; +import NotificationBanner from "@/components/notificationBanner"; const inter = Inter({ subsets: ["latin"] }); @@ -53,7 +54,7 @@ export default function RootLayout({ }>) { return ( - + - logo + logo + logo + diff --git a/app/page.tsx b/app/page.tsx index cc18e28..d3a565e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -14,6 +14,7 @@ import React from "react"; import dynamic from "next/dynamic"; import ListSuggestion from "@/components/listSuggestion"; import Loader from "@/components/loader"; +import { Spinner } from "@/components/ui/spinner"; const EmptyScreen = dynamic(() => import("@/components/emptyScreen"), { ssr: false, @@ -93,28 +94,30 @@ export default function Home() { return (
- +
- - {error ? ( -
-

- Oops! Something Went Wrong!{" "} - : ( -

-

{error}

-
- ) : isLoading ? ( - - ) : commitMessages ? ( - - ) : ( - - )} + + + {error ? ( +
+

+ Oops! Something Went Wrong!{" "} + : ( +

+

{error}

+
+ ) : isLoading ? ( + + ) : commitMessages ? ( + + ) : ( + + )} +
@@ -122,7 +125,7 @@ export default function Home() {
submitForm(e, message)} - className="relative overflow-hidden rounded-lg border bg-primary-foreground/50 focus-within:ring-1 focus-within:ring-ring" + className="relative overflow-hidden rounded-lg border bg-primary-foreground/25 focus-within:ring-1 focus-within:ring-ring shadow" >