From 57706b9e532e32b1b88ecef447bc9380ab90892e Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Fri, 16 Aug 2024 15:00:16 +0700 Subject: [PATCH] ui --- frontend/package.json | 1 + frontend/pnpm-lock.yaml | 9 +++++++++ frontend/src/app/Home.tsx | 10 +++++++--- frontend/src/components/Button.tsx | 9 +++++++-- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 85faa11..5fae620 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "axios": "^1.7.3", + "clsx": "^2.1.1", "react": "^18.3.1", "react-dom": "^18.3.1", "react-icons": "^5.2.1", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 497a618..212dd76 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: axios: specifier: ^1.7.3 version: 1.7.3 + clsx: + specifier: ^2.1.1 + version: 2.1.1 react: specifier: ^18.3.1 version: 18.3.1 @@ -625,6 +628,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -1883,6 +1890,8 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + clsx@2.1.1: {} + color-convert@2.0.1: dependencies: color-name: 1.1.4 diff --git a/frontend/src/app/Home.tsx b/frontend/src/app/Home.tsx index 03301a8..526d489 100644 --- a/frontend/src/app/Home.tsx +++ b/frontend/src/app/Home.tsx @@ -45,9 +45,13 @@ function Home() {

Logged in as

{credentials.email}

-
+
{SERVICES_URL.map((url, idx) => ( - ))} @@ -64,7 +68,7 @@ function Home() { return (
-
+

SSO Login

{SSOLoginStatus()} {loading &&

Loading...

} diff --git a/frontend/src/components/Button.tsx b/frontend/src/components/Button.tsx index b4201df..96c7cb1 100644 --- a/frontend/src/components/Button.tsx +++ b/frontend/src/components/Button.tsx @@ -1,15 +1,20 @@ +import clsx from "clsx"; import { FC, ReactNode } from "react"; interface ButtonProps { children: ReactNode; + className?: string; onClick: () => void; } -export const Button: FC = ({ children, onClick }) => { +export const Button: FC = ({ children, className, onClick }) => { return (