From 64bac48cc406a2a3c0891cd2f559995224bc12d1 Mon Sep 17 00:00:00 2001 From: mkue Date: Mon, 13 Nov 2023 19:08:28 +0000 Subject: [PATCH] Prettified Code! --- ui/src/components/form.tsx | 6 +- ui/src/globals.css | 78 +++++++++---------- website/src/app/globals.css | 23 +++--- .../src/components/navbar/navbar-client.tsx | 13 +--- 4 files changed, 56 insertions(+), 64 deletions(-) diff --git a/ui/src/components/form.tsx b/ui/src/components/form.tsx index 6eb5ee55f..8b6af8aa8 100644 --- a/ui/src/components/form.tsx +++ b/ui/src/components/form.tsx @@ -21,9 +21,9 @@ const FormFieldContext = React.createContext({} as FormFi const FormField = < TFieldValues extends FieldValues = FieldValues, TName extends FieldPath = FieldPath, ->({ - ...props -}: ControllerProps) => { +>( + { ...props }: ControllerProps, +) => { return ( diff --git a/ui/src/globals.css b/ui/src/globals.css index 8e77149dc..38ed416b2 100644 --- a/ui/src/globals.css +++ b/ui/src/globals.css @@ -3,58 +3,58 @@ @tailwind utilities; @layer base { - :root, - .theme-default { - --si-yellow: hsl(48, 100%, 49%); - --background: hsl(219, 100%, 97%); - --foreground: hsl(20 14.3% 4.1%); + :root, + .theme-default { + --si-yellow: hsl(48, 100%, 49%); + --background: hsl(219, 100%, 97%); + --foreground: hsl(20 14.3% 4.1%); - --card: hsl(0 100% 100%); - --card-foreground: hsl(20 14.3% 4.1%); + --card: hsl(0 100% 100%); + --card-foreground: hsl(20 14.3% 4.1%); - --popover: hsl(0 100% 100%); - --popover-foreground: hsl(0, 0%, 40%); + --popover: hsl(0 100% 100%); + --popover-foreground: hsl(0, 0%, 40%); - --primary: hsl(216, 54%, 55%); - --primary-foreground: hsl(60 9.1% 97.8%); + --primary: hsl(216, 54%, 55%); + --primary-foreground: hsl(60 9.1% 97.8%); - --secondary: hsl(8, 89%, 62%); - --secondary-foreground: hsl(240, 2%, 21%); + --secondary: hsl(8, 89%, 62%); + --secondary-foreground: hsl(240, 2%, 21%); - --muted: hsl(60 4.8% 95.9%); - --muted-foreground: hsl(25 5.3% 44.7%); + --muted: hsl(60 4.8% 95.9%); + --muted-foreground: hsl(25 5.3% 44.7%); - --accent: hsl(219, 100%, 95%); - --accent-foreground: hsl(24 9.8% 10%); + --accent: hsl(219, 100%, 95%); + --accent-foreground: hsl(24 9.8% 10%); - --destructive: hsl(0, 75%, 42%); - --destructive-foreground: hsl(60 9.1% 97.8%); + --destructive: hsl(0, 75%, 42%); + --destructive-foreground: hsl(60 9.1% 97.8%); - --border: hsl(20 5.9% 80%); - --input: hsl(20 5.9% 90%); - --ring: hsl(216, 54%, 55%); + --border: hsl(20 5.9% 80%); + --input: hsl(20 5.9% 90%); + --ring: hsl(216, 54%, 55%); - --radius: 0.5rem; - } + --radius: 0.5rem; + } - .theme-light-blue { - --background: hsl(216, 54%, 95%); - } + .theme-light-blue { + --background: hsl(216, 54%, 95%); + } - .theme-dark-blue { - --si-yellow: hsl(48, 100%, 49%); - --background: hsl(216, 54%, 55%); - --foreground: hsl(60 9.1% 97.8%); + .theme-dark-blue { + --si-yellow: hsl(48, 100%, 49%); + --background: hsl(216, 54%, 55%); + --foreground: hsl(60 9.1% 97.8%); - --primary: hsl(48, 100%, 49%); - --primary-foreground: hsl(0, 0%, 20%); - } + --primary: hsl(48, 100%, 49%); + --primary-foreground: hsl(0, 0%, 20%); + } } @layer base { - body, - .theme-default, - .theme-dark-blue { - @apply bg-background text-foreground; - } + body, + .theme-default, + .theme-dark-blue { + @apply bg-background text-foreground; + } } diff --git a/website/src/app/globals.css b/website/src/app/globals.css index 0fed54b89..0f6008677 100644 --- a/website/src/app/globals.css +++ b/website/src/app/globals.css @@ -2,22 +2,21 @@ @tailwind components; @tailwind utilities; - :root { - --h-navbar: 4.5rem; - --h-navbar-mobile: 4rem; + --h-navbar: 4.5rem; + --h-navbar-mobile: 4rem; } .min-h-navbar { - min-height: var(--h-navbar-mobile); - @media screen(md) { - min-height: var(--h-navbar); - } + min-height: var(--h-navbar-mobile); + @media screen(md) { + min-height: var(--h-navbar); + } } .min-h-screen-navbar { - min-height: calc(100vh - var(--h-navbar-mobile)); - @media screen(md) { - min-height: calc(100vh - var(--h-navbar)); - } -} \ No newline at end of file + min-height: calc(100vh - var(--h-navbar-mobile)); + @media screen(md) { + min-height: calc(100vh - var(--h-navbar)); + } +} diff --git a/website/src/components/navbar/navbar-client.tsx b/website/src/components/navbar/navbar-client.tsx index 2ab57a415..8a725a20c 100644 --- a/website/src/components/navbar/navbar-client.tsx +++ b/website/src/components/navbar/navbar-client.tsx @@ -62,16 +62,9 @@ type NavbarProps = { }[]; } & DefaultParams; -export function NavbarClient({ - lang, - region, - translations, - languages, - regions, - currencies, - navigation = [], - showNavigation = true, -}: NavbarProps) { +export function NavbarClient( + { lang, region, translations, languages, regions, currencies, navigation = [], showNavigation = true }: NavbarProps, +) { const [isOpen, setIsOpen] = useState(false); const i18nDialog = (