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
1 change: 1 addition & 0 deletions front/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
8 changes: 6 additions & 2 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
"start": "next dev"
},
"dependencies": {
"@tailwindcss/postcss": "^4.1.17",
"next": "^15.4.1",
"postcss": "^8.5.6",
"react": "^19.1.0",
"react-dom": "^19.1.0"
"react-dom": "^19.1.0",
"tailwindcss": "^4.1.17"
},
"devDependencies": {
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6"
"@types/react-dom": "^19.1.6",
"daisyui": "^5.5.5"
}
}
6 changes: 6 additions & 0 deletions front/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const config = {
plugins: {
"@tailwindcss/postcss": {},
},
};
export default config;
18 changes: 18 additions & 0 deletions front/src/app/embalse-provincia/[provincia]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Link from "next/link";

interface Props {
params: Promise<{ provincia: string }>;
}

export default async function EmbalseProvinciaListadoPage({ params }: Props) {
const { provincia } = await params;
return (
<div className="flex flex-col gap-8">
<h2 className="text-4xl">Embalses de {provincia}</h2>

<Link href="/embalse/casasola" className="text-blue-500 text-xl">
Embalse de Casasola
</Link>
</div>
);
}
12 changes: 12 additions & 0 deletions front/src/app/embalse-provincia/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Link from "next/link";

export default function EmbalsesProvinciaPage() {
return (
<div className="flex flex-col gap-8">
<h2 className="text-4xl">Embalse por provincias</h2>
<Link href="/embalse-provincia/malaga" className="text-blue-500 text-xl">
Málaga
</Link>
</div>
);
}
14 changes: 14 additions & 0 deletions front/src/app/embalse/[embalse]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Link from "next/link";
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import: Link is imported but never used in this component. Consider removing this import to keep the code clean.

Suggested change
import Link from "next/link";

Copilot uses AI. Check for mistakes.

interface Props {
params: Promise<{ embalse: string }>;
}

export default async function EmbalseDetallePage({ params }: Props) {
const { embalse } = await params;
return (
<div className="flex flex-col gap-8">
<h2 className="text-4xl">Detalle del embalse: {embalse}</h2>
</div>
);
}
2 changes: 2 additions & 0 deletions front/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "tailwindcss";
@plugin "daisyui";
16 changes: 13 additions & 3 deletions front/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import React from "react";
import "./globals.css";

interface Props {
children: React.ReactNode;
Expand All @@ -8,8 +9,17 @@ const RootLayout = (props: Props) => {
const { children } = props;
return (
<html lang="en">
<body>
<main>{children}</main>
<body
className="bg-gray-100 text-gray-900 flex flex-col min-h-screen"
suppressHydrationWarning
>
<header className="bg-gray-800 text-white p-4 text-center">
<p className="text-3xl">Soy un header</p>
</header>
<main className="grow p-8">{children}</main>
<footer className="bg-gray-800 text-white p-4 text-center">
<p>Soy un footer</p>
</footer>
</body>
</html>
);
Expand Down
18 changes: 16 additions & 2 deletions front/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import Link from "next/link";

const RootPage = () => {
return <h2>Hello from Nextjs</h2>;
return (
<div className="flex flex-col gap-8">
<h2 className="text-4xl">Página de inicio</h2>
<div className="flex flex-col gap-4">
<Link href="/embalse-provincia" className="mr-4 text-blue-500 text-3xl">
Embalses por provincias
</Link>
<Link href="/embalse/casasola" className="mr-4 text-blue-500 text-3xl">
Detalle del embalse
</Link>
</div>
</div>
);
};

export default RootPage
export default RootPage;
2 changes: 1 addition & 1 deletion front/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
".next/types/**/*.ts",
"**/*.ts",
"**/*.tsx"
],
, "postcss.config.js" ],
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The array formatting is incorrect. The closing bracket and comma should be on separate lines for proper JSON formatting. The line should be:

    "**/*.tsx",
    "postcss.config.js"
  ],

This creates invalid JSON syntax with the comma placed incorrectly.

Copilot uses AI. Check for mistakes.
"exclude": [
"node_modules"
]
Expand Down
Loading