Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import ContactUs from "./pages/ContactUs";
import ScrollToTop from "./components/ScrollToTop";
import Profile from "./pages/Profile";
import ForgotPassword from "./pages/auth/Forgot";
import ResetPassword from "./pages/auth/ResetPassword";
import Workers from "./pages/categories/Workers";
import Suppliers from "./pages/categories/Suppliers";
import HouseOwner from "./pages/categories/HouseOwner";
Expand Down Expand Up @@ -77,7 +78,7 @@ const AppRoutes = () => {
<Route path="login" element={<Login />} />
<Route path="register" element={<Register />} />
<Route path="Forgot" element={<ForgotPassword />} />
<Route path="reset-password" element={<ForgotPassword />} />
<Route path="reset-password" element={<ResetPassword />} />
<Route path="update-password" element={<UpdatePassword />} />

</Route>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/Forgot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ForgotPassword = () => {
const onSubmit = async (data: ForgotPasswordValues) => {
try {
const { error } = await supabase.auth.resetPasswordForEmail(data.email, {
redirectTo: `${window.location.origin}/auth/reset-password`,
redirectTo: `${window.location.origin}/auth/update-password`,
});

if (error) throw error;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/UpdatePassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const UpdatePassword = () => {

const onSubmit = async (data: UpdateValues) => {
const { error } = await supabase.auth.updateUser({
password: data.password
password: data.password
});

if (error) {
Expand Down