diff --git a/package.json b/package.json
index 548b55ed..5e3d64ea 100644
--- a/package.json
+++ b/package.json
@@ -34,6 +34,7 @@
"redis": "^4.6.13",
"square": "^34.0.1",
"swr": "^2.2.5",
+ "usehooks-ts": "^2.14.0",
"zod": "^3.22.4",
"zustand": "^4.4.7"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index aa25db9c..560a906d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -62,6 +62,9 @@ dependencies:
swr:
specifier: ^2.2.5
version: 2.2.5(react@18.2.0)
+ usehooks-ts:
+ specifier: ^2.14.0
+ version: 2.14.0(react@18.2.0)
zod:
specifier: ^3.22.4
version: 3.22.4
@@ -4255,6 +4258,10 @@ packages:
p-locate: 5.0.0
dev: true
+ /lodash.debounce@4.0.8:
+ resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
+ dev: false
+
/lodash.flatmap@4.5.0:
resolution: {integrity: sha512-/OcpcAGWlrZyoHGeHh3cAoa6nGdX6QYtmzNP84Jqol6UEQQ2gIaU3H+0eICcjcKGl0/XF8LWOujNn9lffsnaOg==}
dev: false
@@ -6134,6 +6141,16 @@ packages:
react: 18.2.0
dev: false
+ /usehooks-ts@2.14.0(react@18.2.0):
+ resolution: {integrity: sha512-jnhrjTRJoJS7cFxz63tRYc5mzTKf/h+Ii8P0PDHymT9qDe4ZA2/gzDRmDR4WGausg5X8wMIdghwi3BBCN9JKow==}
+ engines: {node: '>=16.15.0'}
+ peerDependencies:
+ react: ^16.8.0 || ^17 || ^18
+ dependencies:
+ lodash.debounce: 4.0.8
+ react: 18.2.0
+ dev: false
+
/util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: true
diff --git a/src/app/(account)/forgot-password/page.tsx b/src/app/(account)/forgot-password/page.tsx
index 48f7ee82..203968ea 100644
--- a/src/app/(account)/forgot-password/page.tsx
+++ b/src/app/(account)/forgot-password/page.tsx
@@ -11,6 +11,11 @@ import { z } from 'zod';
import { handleClerkErrors } from '../helpers';
import { codeSchema, emailSchema, passwordSchema } from '../schemas';
+// export const metadata: Metadata = {
+// title: 'Forgot Password',
+// robots: { index: false, follow: false },
+// };
+
const sendCodeSchema = z.object({
email: emailSchema,
});
diff --git a/src/app/(account)/join/page.tsx b/src/app/(account)/join/page.tsx
index e3a81d6a..6147cb90 100644
--- a/src/app/(account)/join/page.tsx
+++ b/src/app/(account)/join/page.tsx
@@ -12,7 +12,11 @@ import StepThree from './steps/StepThree';
import StepTwo from './steps/StepTwo';
import { useJoinUsHeading, useJoinUsStep } from './store';
-export default function JoinUsPage() {
+// export const metadata: Metadata = {
+// title: 'Join',
+// };
+
+export default function JoinPage() {
const { step, setStep } = useJoinUsStep();
const { heading } = useJoinUsHeading();
diff --git a/src/app/(account)/join/steps/StepFour.tsx b/src/app/(account)/join/steps/StepFour.tsx
index 8f74defa..a32dc9ff 100644
--- a/src/app/(account)/join/steps/StepFour.tsx
+++ b/src/app/(account)/join/steps/StepFour.tsx
@@ -26,6 +26,7 @@ export default function StepFour() {
},
onSuccess: () => {
router.push('/settings');
+ router.refresh();
},
});
diff --git a/src/app/(account)/join/steps/StepOne.tsx b/src/app/(account)/join/steps/StepOne.tsx
index 9d13d0fe..d4a710fd 100644
--- a/src/app/(account)/join/steps/StepOne.tsx
+++ b/src/app/(account)/join/steps/StepOne.tsx
@@ -3,6 +3,7 @@ import ControlledField from '@/components/ControlledField';
import { useSignUp } from '@clerk/nextjs';
import { zodResolver } from '@hookform/resolvers/zod';
import Link from 'next/link';
+import { useRouter } from 'next/navigation';
import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { FcGoogle } from 'react-icons/fc';
@@ -33,6 +34,7 @@ function VerifyEmail() {
const [verifyEmailLoading, setVerifyEmailLoading] = useState(false);
+ const router = useRouter();
const handleVerify = form.handleSubmit(async ({ code }) => {
if (!isLoaded) return;
@@ -48,6 +50,7 @@ function VerifyEmail() {
return;
}
await setActive({ session: completeSignUp.createdSessionId });
+ router.refresh();
} catch (error) {
handleClerkErrors(error, form, [
{ code: 'form_param_nil', field: 'code', message: 'Please enter the the code.' },
diff --git a/src/app/(account)/settings/page.tsx b/src/app/(account)/settings/page.tsx
index f6e92e0c..ea1c6e11 100644
--- a/src/app/(account)/settings/page.tsx
+++ b/src/app/(account)/settings/page.tsx
@@ -3,10 +3,16 @@ import Title from '@/components/Title';
import { checkUserExists } from '@/server/check-user-exists';
import { verifyMembershipPayment } from '@/server/verify-membership-payment';
import { currentUser } from '@clerk/nextjs';
+import type { Metadata } from 'next';
import Link from 'next/link';
import { notFound } from 'next/navigation';
import Settings from './Settings';
+export const metadata: Metadata = {
+ title: 'Settings',
+ robots: { index: false, follow: false },
+};
+
export default async function SettingsPage() {
const user = await currentUser();
if (!user) return notFound();
diff --git a/src/app/(account)/settings/tabs/MembershipSettings.tsx b/src/app/(account)/settings/tabs/MembershipSettings.tsx
index dadb894f..e257bed9 100644
--- a/src/app/(account)/settings/tabs/MembershipSettings.tsx
+++ b/src/app/(account)/settings/tabs/MembershipSettings.tsx
@@ -52,7 +52,12 @@ export default function MembershipSettings({
Pay Membership Fee
-