diff --git a/apps/client/src/components/Toast.tsx b/apps/client/src/components/Toast.tsx --- a/apps/client/src/components/Toast.tsx +++ b/apps/client/src/components/Toast.tsx @@ -1,6 +1,6 @@ +import { CloseIcon, ToastIcon } from "@cv/ui"; import { cva } from "class-variance-authority"; import { useCallback, useEffect, useState } from "react"; -import { CloseIcon, ToastIcon } from "./icons"; export type ToastLevel = "success" | "warning" | "info" | "error"; @@ -67,11 +67,7 @@ /** * Individual toast notification component */ -export default function ToastComponent({ - toast, - onRemove, - config, -}: ToastProps) { +export const ToastComponent = ({ toast, onRemove, config }: ToastProps) => { const [isVisible, setIsVisible] = useState(false); const [isLeaving, setIsLeaving] = useState(false); @@ -127,4 +123,4 @@ ); -} +}; diff --git a/apps/client/src/components/ToastContainer.tsx b/apps/client/src/components/ToastContainer.tsx --- a/apps/client/src/components/ToastContainer.tsx +++ b/apps/client/src/components/ToastContainer.tsx @@ -1,5 +1,4 @@ -import type { Toast, ToastConfig } from "./Toast"; -import ToastComponent from "./Toast"; +import { type Toast, ToastComponent, type ToastConfig } from "./Toast"; interface ToastContainerProps { toasts: Toast[]; @@ -15,7 +14,9 @@ onRemove, config, }: ToastContainerProps) { - if (toasts.length === 0) return null; + if (toasts.length === 0) { + return null; + } return (
diff --git a/apps/client/src/contexts/ConfirmationModalContext.tsx b/apps/client/src/contexts/ConfirmationModalContext.tsx --- a/apps/client/src/contexts/ConfirmationModalContext.tsx +++ b/apps/client/src/contexts/ConfirmationModalContext.tsx @@ -5,7 +5,7 @@ useContext, useState, } from "react"; -import ConfirmationModal from "@/components/ConfirmationModal"; +import { ConfirmationModal } from "@/components/ConfirmationModal"; interface ConfirmationModalState { isOpen: boolean; diff --git a/apps/client/src/components/ServerStatusIndicator/ServerTooltip.tsx b/apps/client/src/components/ServerStatusIndicator/ServerTooltip.tsx --- a/apps/client/src/components/ServerStatusIndicator/ServerTooltip.tsx +++ b/apps/client/src/components/ServerStatusIndicator/ServerTooltip.tsx @@ -10,7 +10,9 @@ lastChecked, position, }: ServerTooltipProps) => ( -