Skip to content

Commit

Permalink
Update added
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardoFJ committed Feb 15, 2025
1 parent 688c17a commit 107671a
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 84 deletions.
87 changes: 45 additions & 42 deletions app/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,51 @@
import { Dashboard } from "@/components/Dashboard"
import { Button } from "@/components/ui/button"
import Link from "next/link"
import { Heart } from "lucide-react"
// import { Dashboard } from "@/components/Dashboard"
// import { Button } from "@/components/ui/button"
// import Link from "next/link"
// import { Heart } from "lucide-react"

import { redirect } from "next/navigation"

export default function DashboardPage() {
return (
<div className="min-h-screen flex flex-col bg-gradient-to-b from-pink-100 to-red-100">
<header className="bg-white shadow-md">
<div className="container mx-auto px-4 py-4 flex justify-between items-center">
<Link href="/" className="flex items-center gap-2 text-2xl font-bold text-primary">
<Heart className="w-6 h-6" />
<span>Robocupido 2025</span>
</Link>
<nav>
<Button variant="ghost" asChild>
<Link href="/profile">Mi Perfil</Link>
</Button>
<Button variant="ghost" asChild>
<Link href="/settings">Configuración</Link>
</Button>
<Button variant="outline">Cerrar Sesión</Button>
</nav>
</div>
</header>
redirect("/")
// return (
// <div className="min-h-screen flex flex-col bg-gradient-to-b from-pink-100 to-red-100">
// <header className="bg-white shadow-md">
// <div className="container mx-auto px-4 py-4 flex justify-between items-center">
// <Link href="/" className="flex items-center gap-2 text-2xl font-bold text-primary">
// <Heart className="w-6 h-6" />
// <span>Robocupido 2025</span>
// </Link>
// <nav>
// <Button variant="ghost" asChild>
// <Link href="/profile">Mi Perfil</Link>
// </Button>
// <Button variant="ghost" asChild>
// <Link href="/settings">Configuración</Link>
// </Button>
// <Button variant="outline">Cerrar Sesión</Button>
// </nav>
// </div>
// </header>

<main className="flex-grow">
<Dashboard />
</main>
// <main className="flex-grow">
// <Dashboard />
// </main>

<footer className="bg-white mt-12">
<div className="container mx-auto px-4 py-6 text-center text-gray-600">
<p>&copy; 2025 Robocupido. Todos los derechos reservados.</p>
<div className="mt-2">
<Link href="/privacy" className="text-sm hover:underline">
Política de Privacidad
</Link>
{" | "}
<Link href="/terms" className="text-sm hover:underline">
Términos de Servicio
</Link>
</div>
</div>
</footer>
</div>
)
// <footer className="bg-white mt-12">
// <div className="container mx-auto px-4 py-6 text-center text-gray-600">
// <p>&copy; 2025 Robocupido. Todos los derechos reservados.</p>
// <div className="mt-2">
// <Link href="/privacy" className="text-sm hover:underline">
// Política de Privacidad
// </Link>
// {" | "}
// <Link href="/terms" className="text-sm hover:underline">
// Términos de Servicio
// </Link>
// </div>
// </div>
// </footer>
// </div>
// )
}

2 changes: 1 addition & 1 deletion app/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RegistrationForm from "@/components/RegistrationForm"

import { redirect } from "next/navigation"

export default function RegisterPage() {
Expand Down
28 changes: 6 additions & 22 deletions components/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client"

import { useState } from "react"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
Expand Down Expand Up @@ -137,16 +136,13 @@ const InterestIcon = ({ interest }: { interest: string }) => {
}
}

const MatchCard = ({ match, type }: { match: (typeof mockMatches.pareja)[0]; type: MatchType }) => (
const MatchCard = ({ match, type }: { match: Partial<(typeof mockMatches.pareja)[0]>; type: MatchType }) => (
<Card className="mb-6">
<CardHeader className="flex flex-row items-start gap-6">
<Avatar className="w-24 h-24">
<AvatarImage src={`https://api.dicebear.com/6.x/micah/svg?seed=${match.name}`} />
<AvatarFallback>
{match.name
.split(" ")
.map((n) => n[0])
.join("")}
{match.name?.split(" ").map((n) => n[0]).join("")}
</AvatarFallback>
</Avatar>
<div className="flex-1">
Expand Down Expand Up @@ -177,7 +173,7 @@ const MatchCard = ({ match, type }: { match: (typeof mockMatches.pareja)[0]; typ
<div className="mb-4">
<h4 className="font-semibold mb-2">Intereses</h4>
<div className="flex flex-wrap gap-2">
{match.interests.map((interest, index) => (
{match.interests?.map((interest, index) => (
<Badge key={index} variant="secondary" className="flex items-center gap-1">
<InterestIcon interest={interest} />
{interest}
Expand Down Expand Up @@ -258,8 +254,8 @@ const StatCard = ({ icon, title, value }: { icon: React.ReactNode; title: string
)

export function Dashboard() {
const [activeTab, setActiveTab] = useState<MatchType>("pareja")

// const [activeTab, setActiveTab] = useState<MatchType>("pareja")
return (
<div className="container mx-auto px-4 py-8">
<h1 className="text-3xl font-bold mb-6 text-center">Tus Matches de Robocupido 2025</h1>
Expand All @@ -270,19 +266,7 @@ export function Dashboard() {
<StatCard icon={<Calendar />} title="Citas Próximas" value={userStats.upcomingDates} />
</div>

<Card className="mb-8">
<CardHeader>
<CardTitle>Consejo del Día</CardTitle>
</CardHeader>
<CardContent>
<p className="text-gray-600">
"La clave para una conexión genuina es la autenticidad. Sé tú mismo y deja que tu personalidad brille en
cada interacción."
</p>
</CardContent>
</Card>

<Tabs defaultValue="pareja" className="w-full" onValueChange={(value) => setActiveTab(value as MatchType)}>
<Tabs defaultValue="pareja" className="w-full">
<TabsList className="grid w-full grid-cols-3 mb-6">
<TabsTrigger value="pareja">Pareja</TabsTrigger>
<TabsTrigger value="amigos">Amigos</TabsTrigger>
Expand Down
36 changes: 17 additions & 19 deletions components/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,31 @@

import { Tangerine } from "next/font/google"
import Image from 'next/image'
import { useState } from "react"
// import { useState } from "react"
import styles from './/font.module.css'
import { useSession } from "next-auth/react"
import { Button } from "@/components/ui/button"
import { PrivacyPopup } from "./PrivacyPopup"
import { useRouter } from "next/navigation"
// import { useSession } from "next-auth/react"
// import { useRouter } from "next/navigation"
import { CountdownTimer } from "./CountdownTimer"

const tangerine = Tangerine({ subsets: ["latin"], weight: ["400", "700"] });

const Welcome = () => {
const { data: session } = useSession()
const [isPrivacyPopupOpen, setIsPrivacyPopupOpen] = useState(false)
const router = useRouter()
// const { data: session } = useSession()
// // const [isPrivacyPopupOpen, setIsPrivacyPopupOpen] = useState(false)
// const router = useRouter()

const handleRegisterClick = () => {
if (!session) {
setIsPrivacyPopupOpen(true)
return
}else{
router.push("/register")
}
}
// // const handleRegisterClick = () => {
// // if (!session) {
// // setIsPrivacyPopupOpen(true)
// // return
// // }else{
// // router.push("/register")
// // }
// // }

const handleClosePrivacyPopup = () => {
setIsPrivacyPopupOpen(false)
}
// // const handleClosePrivacyPopup = () => {
// // setIsPrivacyPopupOpen(false)
// // }
return (
// El cuadro que anda ahi
<div className="flex items-center justify-center min-h-screen bg-center ">
Expand Down

0 comments on commit 107671a

Please sign in to comment.