diff --git a/.env b/.env new file mode 100644 index 0000000..2d74d2a --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +SUPABASE_URL="https://qsssikzgwomudkwfmgad.supabase.co" +# DATABASE_URL="postgresql://postgres.qsssikzgwomudkwfmgad:etrTXNz3ZOwaLJmT@aws-0-eu-north-1.pooler.supabase.com:6543/postgres" +DATABASE_URL="postgresql://postgres.qsssikzgwomudkwfmgad:Wrongly1-Untimed0-Peculiar0-Unlikable7-Cubbyhole8@aws-0-eu-north-1.pooler.supabase.com:6543/postgre" +APIKEY_MAPS="AIzaSyAwfOShBqkBcS46WqmlsIVWQJ8gpdOPk_4" +SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InFzc3Npa3pnd29tdWRrd2ZtZ2FkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTQzMjY1NTQsImV4cCI6MjA2OTkwMjU1NH0.BTSscdTcPP1GVmMB-H5caLpWsfuAw1V6mXiqogF8TjU" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2d192b5..fc44466 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ dist dist-ssr *.local count.txt -.env .nitro .tanstack .output diff --git a/public/drone.webp b/public/drone.webp new file mode 100644 index 0000000..ac469e5 Binary files /dev/null and b/public/drone.webp differ diff --git a/public/profile.png b/public/profile.png new file mode 100644 index 0000000..18b960e Binary files /dev/null and b/public/profile.png differ diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index a9f57ab..c3c0ce1 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -53,11 +53,19 @@ function RootDocument({ children }: { children: React.ReactNode }) { - {children} +
+ {children} +
) -} +} \ No newline at end of file diff --git a/src/routes/_authed.tsx b/src/routes/_authed.tsx index 5258201..87e8469 100644 --- a/src/routes/_authed.tsx +++ b/src/routes/_authed.tsx @@ -1,4 +1,11 @@ -import { createFileRoute } from "@tanstack/react-router" +import { + Avatar, + Dropdown, + DropdownItem, + DropdownMenu, + DropdownTrigger +} from "@heroui/react" +import { createFileRoute, Outlet } from "@tanstack/react-router" import { getProfile } from "@/lib/server/user" export const Route = createFileRoute("/_authed")({ @@ -8,7 +15,7 @@ export const Route = createFileRoute("/_authed")({ // TODO: Redirect to login page } }, - loader: ({context: {queryClient, user}} ) => { + loader: ({ context: { queryClient, user } }) => { queryClient.ensureQueryData({ queryKey: ["profile"], queryFn: () => getProfile({ data: { id: user?.id as string } }) @@ -23,5 +30,38 @@ export const Route = createFileRoute("/_authed")({ ) } throw error - } + }, + component: RouteComponent }) + +function RouteComponent() { + const navigate = Route.useNavigate() + return ( +
+ + +
+ ) +} diff --git a/src/routes/_authed/dashboard.tsx b/src/routes/_authed/dashboard.tsx index fd0e184..d75babe 100644 --- a/src/routes/_authed/dashboard.tsx +++ b/src/routes/_authed/dashboard.tsx @@ -1,4 +1,12 @@ -import { Button } from "@heroui/react" +import { + Avatar, + Card, + CardBody, + CardFooter, + CardHeader, + Chip, + Divider +} from "@heroui/react" import { useQuery } from "@tanstack/react-query" import { createFileRoute } from "@tanstack/react-router" import { getAllUsers, getProfile } from "@/lib/server/user" @@ -8,9 +16,8 @@ export const Route = createFileRoute("/_authed/dashboard")({ }) function RouteComponent() { - const navigate = Route.useNavigate() const { user } = Route.useRouteContext() - console.log("User in dashboard:", user) + const { data } = useQuery({ queryKey: ["users"], queryFn: async () => { @@ -25,24 +32,110 @@ function RouteComponent() { } }) - console.log(data) - console.log(profile) - return ( -
- Hello "/_authed/dashboard"!{" "} -
- {" "} - -
+
+ + + + Inicio {profile?.firstName ?? "demo"} + +
+

🏗️ La web está en mantenimiento

+
+
+ + {/* === GRID PRINCIPAL === */} +
+ {/* === Tarjeta 1: Mis drones === */} + + +
+

+ Mis drones +

+

+ Actualiza tus drones en uso o pilotados. +

+
+ +
+ +

Ver más

+
+
+ + {/* === Tarjeta 2: Datos personales === */} + + +
+

+ Datos personales +

+

+ Actualiza tu información, ubicación y detalles. +

+
+ +
+ +

Ver más

+
+
+ + {/* === Tarjeta 3: Ofertas de vuelo === */} + + +
+

+ Ofertas de vuelo +

+

+ Explora y gestiona tus ofertas de vuelo activas. +

+
+ +
+ +

Próximamente...

+
+ +

Ver más

+
+
+ + {/* === Mapa (ocupa 2 columnas) === */} +
+ {/* Aquí irá el mapa */} +
+
+
+
) } + +export default RouteComponent diff --git a/src/styles/globals.css b/src/styles/globals.css index 2c40877..14e3648 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -1,3 +1,4 @@ +@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Outfit:wght@100..900&family=Rubik+Vinyl&display=swap'); @import "tailwindcss"; @plugin '../integrations/heroui/heroui.ts'; @@ -13,7 +14,15 @@ body { -moz-osx-font-smoothing: grayscale; } +@theme { + --font-outfit: "Outfit", sans-serif; + --font-rubik-vinyl: "Rubik Vinyl", cursive; + --font-luckiest-guy: "Luckiest Guy", cursive; +} + code { font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; } + +