diff --git a/.prettierignore b/.prettierignore index 6d2eaaa..b802e2b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ -.github/ \ No newline at end of file +.github/ +src/components/Button/ \ No newline at end of file diff --git a/src/api/queries.ts b/src/api/queries.ts index c20a6ef..74c92d0 100644 --- a/src/api/queries.ts +++ b/src/api/queries.ts @@ -1,4 +1,5 @@ import axios from "axios"; +import type { DashboardData } from "../pages/DashboardPage/DashboardPage.definitions"; import type { PassengerData } from "../interfaces/passenger.interface"; export const getPassengers = async ( @@ -123,3 +124,14 @@ export const updatePassenger = ( }, }) .then((res) => res.data); + +export const getDashboardData = ( + token?: string | null, +): Promise => + axios + .get(`${process.env.VITE_HOST}/dashboard`, { + headers: { + Authorization: `Bearer ${token}`, + }, + }) + .then((res) => res.data); diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 72d7370..44358e9 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -18,12 +18,13 @@ const Button = ({ textStyles = {}, }: ButtonProps) => { const buttonClassName = `${styles.button} ${styles[variant]} ${styles[color]}`; + const loaderSize = variant === ButtonVariant.Compact ? 15 : variant === ButtonVariant.Regular - ? 20 - : 25; + ? 20 + : 25; return (