redirect to melbourne route after login
This commit is contained in:
@@ -174,7 +174,7 @@ export function DiscoverPage({
|
||||
|
||||
return (
|
||||
<Layout
|
||||
activeCity="shared"
|
||||
activeCity={sessionStorage.getItem("lastKnownCity") ||"shared"}
|
||||
onSignInClick={onSignInClick}
|
||||
onSignOutClick={onSignOutClick}
|
||||
user={user}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { X } from 'lucide-react';
|
||||
import { Button } from './ui/button';
|
||||
import { Input } from './ui/input';
|
||||
import { Label } from './ui/label';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
interface LoginModalProps {
|
||||
isOpen: boolean;
|
||||
@@ -19,6 +20,8 @@ export function LoginModal({ isOpen, onClose, onLoginSuccess }: LoginModalProps)
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [helperText, setHelperText] = useState('');
|
||||
|
||||
const navigate = useNavigate()
|
||||
|
||||
// Reset modal state when closed
|
||||
useEffect(() => {
|
||||
if (!isOpen) {
|
||||
@@ -98,6 +101,7 @@ export function LoginModal({ isOpen, onClose, onLoginSuccess }: LoginModalProps)
|
||||
name: name.length > 8 ? name.substring(0, 8) : name
|
||||
});
|
||||
setIsLoading(false);
|
||||
navigate("/melbourne")
|
||||
onClose();
|
||||
}, 1500);
|
||||
};
|
||||
|
||||
@@ -192,7 +192,7 @@ export function PassesPage({
|
||||
|
||||
return (
|
||||
<Layout
|
||||
activeCity="shared"
|
||||
activeCity={sessionStorage.getItem("lastKnownCity")||"shared"}
|
||||
onSignInClick={onSignInClick}
|
||||
onSignOutClick={onSignOutClick}
|
||||
user={userData} // ✅ Pass the updated user data
|
||||
|
||||
@@ -19,7 +19,7 @@ import { LandingNewsletterSection } from '../components/LandingNewsletterSection
|
||||
import { CustomPostcards } from '../components/CustomPostcards';
|
||||
import { Layout } from '../Layout';
|
||||
import { getAutoNavigationSource } from '../utils/getAutoNavigationSource';
|
||||
import { useGetProductsQuery } from '../Redux/services/fakeapi.service';
|
||||
import { useGetProductsQuery } from '../Redux/services/fakeApi.service';
|
||||
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ export function LandingPage({ onSignInClick,
|
||||
const location = useLocation();
|
||||
const activeCity = getAutoNavigationSource(location);
|
||||
|
||||
const { data } = useGetProductsQuery()
|
||||
console.log(data)
|
||||
// const { data } = useGetProductsQuery()
|
||||
// console.log(data)
|
||||
|
||||
const cities = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user