diff --git a/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsx b/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsx
index 4898c5a825..6f0e0e587c 100644
--- a/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsx
+++ b/frontend/editor/src/core/components/onboarding/slides/FirstLoginSlide.tsx
@@ -31,7 +31,9 @@ function FirstLoginForm({
const [loading, setLoading] = useState(false);
const [error, setError] = useState("");
- const handleSubmit = async () => {
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault();
+
// Validation
if (
(!usingDefaultCredentials && !currentPassword) ||
@@ -115,102 +117,104 @@ function FirstLoginForm({
return (
-
-
-
-
- {t(
- "firstLogin.welcomeMessage",
- "For security reasons, you must change your password on your first login.",
- )}
-
-
+
+
);
diff --git a/frontend/editor/src/core/components/shared/FirstLoginModal.tsx b/frontend/editor/src/core/components/shared/FirstLoginModal.tsx
index 00dc4594b5..4d7764f91d 100644
--- a/frontend/editor/src/core/components/shared/FirstLoginModal.tsx
+++ b/frontend/editor/src/core/components/shared/FirstLoginModal.tsx
@@ -37,7 +37,9 @@ export default function FirstLoginModal({
const [loading, setLoading] = useState(false);
const [error, setError] = useState("");
- const handleSubmit = async () => {
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault();
+
// Validation
if (!currentPassword || !newPassword || !confirmPassword) {
setError(t("firstLogin.allFieldsRequired", "All fields are required"));
@@ -125,86 +127,90 @@ export default function FirstLoginModal({
size="md"
zIndex={Z_INDEX_OVER_FULLSCREEN_SURFACE}
>
-
- }
- title={t("firstLogin.welcomeTitle", "Welcome!")}
- color="blue"
- >
-
- {t(
- "firstLogin.welcomeMessage",
- "For security reasons, you must change your password on your first login.",
- )}
-
-
-
-
- {t("firstLogin.loggedInAs", "Logged in as")}:{" "}
- {username}
-
-
- {error && (
+
+
);
}