diff --git a/client/src/components/ui/TermsAndConditionsModal.tsx b/client/src/components/Chat/TermsAndConditionsModal.tsx similarity index 70% rename from client/src/components/ui/TermsAndConditionsModal.tsx rename to client/src/components/Chat/TermsAndConditionsModal.tsx index 65e348d296..234f91f87d 100644 --- a/client/src/components/ui/TermsAndConditionsModal.tsx +++ b/client/src/components/Chat/TermsAndConditionsModal.tsx @@ -1,9 +1,9 @@ import React from 'react'; import MarkdownLite from '~/components/Chat/Messages/Content/MarkdownLite'; -import DialogTemplate from '~/components/ui/DialogTemplate'; +import OGDialogTemplate from '~/components/ui/OGDialogTemplate'; import { useAcceptTermsMutation } from '~/data-provider'; +import { OGDialog, Button, Spinner } from '~/components'; import { useToastContext } from '~/Providers'; -import { OGDialog } from '~/components/ui'; import { useLocalize } from '~/hooks'; interface TermsModalProps { @@ -36,6 +36,8 @@ const TermsAndConditionsModal = ({ }, }); + const isLoading = acceptTermsMutation.isLoading; + const handleAccept = () => { acceptTermsMutation.mutate(); }; @@ -54,7 +56,7 @@ const TermsAndConditionsModal = ({ return ( - -
+
{modalContent ? ( ) : ( @@ -76,18 +78,12 @@ const TermsAndConditionsModal = ({ } buttons={ <> - - + + } /> diff --git a/client/src/routes/Root.tsx b/client/src/routes/Root.tsx index b67a437580..fddf92c6e7 100644 --- a/client/src/routes/Root.tsx +++ b/client/src/routes/Root.tsx @@ -9,7 +9,7 @@ import { SetConvoProvider, } from '~/Providers'; import { useAuthContext, useAssistantsMap, useAgentsMap, useFileMap, useSearch } from '~/hooks'; -import TermsAndConditionsModal from '~/components/ui/TermsAndConditionsModal'; +import TermsAndConditionsModal from '~/components/Chat/TermsAndConditionsModal'; import { useUserTermsQuery, useGetStartupConfig } from '~/data-provider'; import { Nav, MobileNav } from '~/components/Nav'; import { Banner } from '~/components/Banners'; @@ -49,7 +49,6 @@ export default function Root() { setShowTerms(false); }; - // Pass the desired redirect parameter to logout const handleDeclineTerms = () => { setShowTerms(false); logout('/login?redirect=false');