Skip to content

Commit

Permalink
Revert "fix reset password"
Browse files Browse the repository at this point in the history
This reverts commit 4949526.
  • Loading branch information
AykutSarac committed Oct 23, 2023
1 parent 4949526 commit f4d5348
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/forgot-password.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
import { Button, Group, Paper, Stack, TextInput, Text, Anchor, PasswordInput } from "@mantine/core";
import { toast } from "react-hot-toast";
import Layout from "src/layout/Layout";
import { supabase } from "src/lib/api/supabase";
import useUser from "src/store/useUser";

function ResetPassword() {
const [loading, setLoading] = React.useState(false);
Expand Down Expand Up @@ -68,10 +68,11 @@ function ResetPassword() {
}

const ForgotPassword = () => {
const isAuthenticated = useUser(state => state.isAuthenticated);
const { query } = useRouter();
const [loading, setLoading] = React.useState(false);
const [email, setEmail] = React.useState("");
const [success, setSuccess] = React.useState(false);
const isPasswordReset = query?.type === "recovery" && !query?.error;

const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
try {
Expand All @@ -96,7 +97,7 @@ const ForgotPassword = () => {
<title>Reset Password - JSON Crack</title>
<meta name="robots" content="noindex,nofollow" />
</Head>
{isAuthenticated ? (
{isPasswordReset ? (
<ResetPassword />
) : (
<Paper mx="auto" mt={70} maw={400} p="lg" withBorder>
Expand Down

1 comment on commit f4d5348

@vercel
Copy link

@vercel vercel bot commented on f4d5348 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

jsoncrack – ./

jsoncrack-realityzero.vercel.app
jsoncrack-psi.vercel.app
jsoncrack-git-main-realityzero.vercel.app

Please sign in to comment.