A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(web): use post in pre-login pages when react fails to render
Mohamed Bassem75aeaaa4eb71
diff --git a/apps/web/components/invite/InviteAcceptForm.tsx b/apps/web/components/invite/InviteAcceptForm.tsxindex e3e9ff82..613f55c3 100644--- a/apps/web/components/invite/InviteAcceptForm.tsx+++ b/apps/web/components/invite/InviteAcceptForm.tsx@@ -188,6 +188,8 @@ export default function InviteAcceptForm({ token }: InviteAcceptFormProps) {<Form {...form}><form+ // POST so a submit before hydration doesn't put the password in the URL.+ method="post"onSubmit={form.handleSubmit(async (value) => {try {await acceptInviteMutation.mutateAsync({diff --git a/apps/web/components/settings/ChangePassword.tsx b/apps/web/components/settings/ChangePassword.tsxindex da2e935e..2ea710c1 100644--- a/apps/web/components/settings/ChangePassword.tsx+++ b/apps/web/components/settings/ChangePassword.tsx@@ -75,7 +75,12 @@ export function ChangePassword() {return (<SettingsSection id="security" title="Security"><Form {...form}>- <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">+ <form+ // POST so a submit before hydration doesn't put the password in the URL.+ method="post"+ onSubmit={form.handleSubmit(onSubmit)}+ className="space-y-4"+ ><FormFieldcontrol={form.control}name="currentPassword"diff --git a/apps/web/components/signin/CredentialsForm.tsx b/apps/web/components/signin/CredentialsForm.tsxindex f69de68e..8126bd28 100644--- a/apps/web/components/signin/CredentialsForm.tsx+++ b/apps/web/components/signin/CredentialsForm.tsx@@ -71,6 +71,8 @@ export default function CredentialsForm() {<div className="space-y-6"><Form {...form}><form+ // POST so a submit before hydration doesn't put the password in the URL.+ method="post"onSubmit={form.handleSubmit(async (value) => {const resp = await signIn("credentials", {email: value.email.trim(),diff --git a/apps/web/components/signin/ResetPasswordForm.tsx b/apps/web/components/signin/ResetPasswordForm.tsxindex e7b8cae1..08016e4c 100644--- a/apps/web/components/signin/ResetPasswordForm.tsx+++ b/apps/web/components/signin/ResetPasswordForm.tsx@@ -104,6 +104,8 @@ export default function ResetPasswordForm({ token }: ResetPasswordFormProps) {<><Form {...form}><form+ // POST so a submit before hydration doesn't put the password in the URL.+ method="post"onSubmit={form.handleSubmit(onSubmit)}className="space-y-4">diff --git a/apps/web/components/signup/SignUpForm.tsx b/apps/web/components/signup/SignUpForm.tsxindex eddfcef7..5bc782e8 100644--- a/apps/web/components/signup/SignUpForm.tsx+++ b/apps/web/components/signup/SignUpForm.tsx@@ -100,6 +100,8 @@ export default function SignUpForm({ redirectUrl }: SignUpFormProps) {<CardContent className="space-y-6"><Form {...form}><form+ // POST so a submit before hydration doesn't put the password in the URL.+ method="post"onSubmit={form.handleSubmit(async (value) => {if (turnstileSiteKey && !value.turnstileToken) {form.setError("turnstileToken", {