// ----------------------------------------------------------------------------- // Rent-Ka — Rental listings aggregator (Canada, outside Québec) // Author: Simon-Pierre Boucher — contact@spboucher.ai // pages/Bienvenue.tsx: onboarding after account creation — role choice // "I'm looking for a rental" (tenant: saved rentals…) or "I manage rentals" // (manager: customizable page for their portfolio). // ----------------------------------------------------------------------------- import { useState } from "react"; import { useNavigate } from "react-router-dom"; import { setRole } from "../api"; import { useAccount } from "../account"; import { IcoBuilding, IcoHeart, IcoHouse, IcoSliders } from "../components/Icons"; export default function BienvenuePage() { const { me, loaded, refresh } = useAccount(); const [busy, setBusy] = useState<"locataire" | "gestionnaire" | null>(null); const nav = useNavigate(); const choose = async (role: "locataire" | "gestionnaire") => { setBusy(role); await setRole(role); refresh(); nav(role === "gestionnaire" ? "/manage" : "/", { replace: true }); }; if (loaded && !me) { return (
); } return (One last step: tell us how you'll use Rent-Ka. You can change your mind later in your profile.