-
-
-
{
- setIsLoading(loadingValue);
- }}
- isInitialized={initialized}
- />
+ {isLoading ? (
+
+ ) : (
+
+
+ {
+ setIsLoading(loadingValue);
+ }}
+ isInitialized={initialized}
+ />
+
+
+
+
-
-
-
-
+ )}
);
}
diff --git a/frontend/src/app/sitemap.ts b/frontend/src/app/sitemap.ts
new file mode 100644
index 00000000..5a8bea75
--- /dev/null
+++ b/frontend/src/app/sitemap.ts
@@ -0,0 +1,25 @@
+import { MetadataRoute } from 'next';
+
+import { Navigation } from '@/constants';
+
+const BASE_URL = 'https://basemind.ai';
+const SitemapArray = [
+ Navigation.Base,
+ Navigation.SignIn,
+ Navigation.PrivacyPolicy,
+ Navigation.TOS,
+ Navigation.Support,
+ Navigation.CreateProject,
+ Navigation.Settings,
+ Navigation.Projects,
+];
+export default function SiteMap(): MetadataRoute.Sitemap {
+ return SitemapArray.map((path, index) => {
+ return {
+ changeFrequency: 'weekly',
+ lastModified: new Date(),
+ priority: 1 - index,
+ url: BASE_URL + path,
+ };
+ });
+}
diff --git a/frontend/src/components/sign-in/firebase-login.spec.tsx b/frontend/src/components/sign-in/firebase-login.spec.tsx
index ed97a5e9..e75972ef 100644
--- a/frontend/src/components/sign-in/firebase-login.spec.tsx
+++ b/frontend/src/components/sign-in/firebase-login.spec.tsx
@@ -1,5 +1,4 @@
import {
- EmailAuthProvider,
GithubAuthProvider,
GoogleAuthProvider,
signInWithPopup,
@@ -38,7 +37,6 @@ describe('FirebaseLogin tests', () => {
).toBeInTheDocument();
});
- expect(screen.getByTestId('email-login-button')).toBeInTheDocument();
expect(screen.getByTestId('github-login-button')).toBeInTheDocument();
expect(screen.getByTestId('google-login-button')).toBeInTheDocument();
@@ -64,7 +62,6 @@ describe('FirebaseLogin tests', () => {
});
it.each([
- ['email-login-button', EmailAuthProvider],
['github-login-button', GithubAuthProvider],
['google-login-button', GoogleAuthProvider],
])(
@@ -113,7 +110,7 @@ describe('FirebaseLogin tests', () => {
let button: HTMLButtonElement;
await waitFor(() => {
- button = screen.getByTestId('email-login-button');
+ button = screen.getByTestId('github-login-button');
expect(button).toBeInTheDocument();
});
@@ -142,13 +139,4 @@ describe('FirebaseLogin tests', () => {
getEnv().NEXT_PUBLIC_FRONTEND_HOST + Navigation.PrivacyPolicy,
);
});
-
- it('should open the reset password modal when the reset password button is clicked', () => {
- render(
);
- const resetPasswordButton: HTMLButtonElement = screen.getByTestId(
- 'reset-password-button',
- );
- fireEvent.click(resetPasswordButton);
- expect(screen.getByTestId('password-reset-modal')).toBeInTheDocument();
- });
});
diff --git a/frontend/src/components/sign-in/firebase-login.tsx b/frontend/src/components/sign-in/firebase-login.tsx
index 5e16875b..0f63f3b2 100644
--- a/frontend/src/components/sign-in/firebase-login.tsx
+++ b/frontend/src/components/sign-in/firebase-login.tsx
@@ -2,16 +2,15 @@ import { FirebaseError } from '@firebase/app';
import {
Auth,
AuthProvider,
- EmailAuthProvider,
GithubAuthProvider,
GoogleAuthProvider,
- sendEmailVerification,
sendPasswordResetEmail,
signInWithPopup,
User,
} from '@firebase/auth';
import { useClickAway } from '@uidotdev/usehooks';
import Image from 'next/image';
+import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useTranslations } from 'next-intl';
import { LegacyRef, useEffect, useState } from 'react';
@@ -45,8 +44,6 @@ const authProviders: {
},
];
-const emailProvider = new EmailAuthProvider();
-
export function FirebaseLogin({
setLoading,
isInitialized,
@@ -137,39 +134,19 @@ export function FirebaseLogin({
data-testid="firebase-login-container"
className="flex items-center h-full w-full justify-center"
>
-
-
-
-
-
+
+
+ {t('welcomeMessage')}
+
+
+ {t('welcomeMessageDescription')}
+
{authProviders.map(({ key, provider, size }) => (