File tree Expand file tree Collapse file tree 8 files changed +103
-6
lines changed
Expand file tree Collapse file tree 8 files changed +103
-6
lines changed Original file line number Diff line number Diff line change 1+ import { Metadata } from "next" ;
2+ import { EquipoPod } from "@/pods/equipo" ;
3+
4+ export const metadata : Metadata = {
5+ title : "Equipo - InfoEmbalses" ,
6+ } ;
7+
8+ const EquipoPage = ( ) => {
9+ return (
10+ < div className = "container mx-auto max-w-3xl px-4 py-8" >
11+ < div className = "flex flex-col items-center gap-6" >
12+ < img src = "/images/logo.svg" alt = "InfoEmbalses logo" className = "w-64" />
13+ < p className = "text-xl font-semibold" > InfoEmbalses Versión Beta</ p >
14+ < h1 className = "text-3xl font-bold" > Equipo de desarrollo</ h1 >
15+ < EquipoPod />
16+ </ div >
17+ </ div >
18+ ) ;
19+ } ;
20+
21+ export default EquipoPage ;
Original file line number Diff line number Diff line change @@ -7,12 +7,20 @@ export const FooterComponent: FC = () => {
77 < footer className = "bg-base-100" >
88 < div className = "border-accent flex flex-col items-center gap-2 border-t-2 p-3" >
99 < div className = "flex flex-col items-center gap-2 pb-2.5" >
10- < Link
11- href = "/embalse-provincia"
12- className = "link-accessible text-[15px] leading-none font-normal"
13- >
14- Embalses por provincias
15- </ Link >
10+ < div className = "flex flex-wrap justify-center gap-x-3 gap-y-1" >
11+ < Link
12+ href = "/embalse-provincia"
13+ className = "link-accessible text-[15px] leading-none font-normal"
14+ >
15+ Embalses por provincias
16+ </ Link >
17+ < Link
18+ href = "/equipo"
19+ className = "link-accessible text-[15px] leading-none font-normal"
20+ >
21+ Equipo
22+ </ Link >
23+ </ div >
1624
1725 < div className = "flex flex-wrap justify-center gap-x-3 gap-y-1" >
1826 < Link
Original file line number Diff line number Diff line change 1+ import type { Media } from "@content-island/api-client" ;
2+
3+ export interface Developer {
4+ id : string ;
5+ language : "es" ;
6+ lastUpdate : string ;
7+ fullname : string ;
8+ picture : Media ;
9+ linkedin : string ;
10+ }
Original file line number Diff line number Diff line change 1+ import "server-only" ;
2+ import { unstable_cache } from "next/cache" ;
3+ import type { Developer } from "./equipo.api-model" ;
4+ import { contentIslandClient } from "@/lib" ;
5+
6+ export const getDeveloperListCached = unstable_cache (
7+ async ( ) : Promise < Developer [ ] > => {
8+ try {
9+ return await contentIslandClient . getContentList < Developer > ( {
10+ contentType : "developer" ,
11+ language : "es" ,
12+ } ) ;
13+ } catch ( error ) {
14+ console . warn ( "Warning: developer list not available" ) ;
15+ return [ ] ;
16+ }
17+ } ,
18+ [ "developer-list" ] ,
19+ { revalidate : 60 }
20+ ) ;
Original file line number Diff line number Diff line change 1+ export * from "./equipo.api" ;
2+ export type { Developer } from "./equipo.api-model" ;
Original file line number Diff line number Diff line change 1+ import type { Developer } from "./api" ;
2+
3+ interface Props {
4+ developers : Developer [ ] ;
5+ }
6+
7+ export const EquipoComponent : React . FC < Props > = ( { developers } ) => {
8+ return (
9+ < div className = "flex flex-wrap justify-center gap-8" >
10+ { developers . map ( ( dev ) => (
11+ < a
12+ key = { dev . id }
13+ href = { dev . linkedin }
14+ target = "_blank"
15+ rel = "noopener noreferrer"
16+ className = "flex flex-col items-center gap-2"
17+ >
18+ < img
19+ src = { dev . picture . url }
20+ alt = { dev . fullname }
21+ className = "h-24 w-24 rounded-full border-2 border-accent object-cover"
22+ />
23+ < span className = "text-sm font-medium" > { dev . fullname } </ span >
24+ </ a >
25+ ) ) }
26+ </ div >
27+ ) ;
28+ } ;
Original file line number Diff line number Diff line change 1+ import { getDeveloperListCached } from "./api" ;
2+ import { EquipoComponent } from "./equipo.component" ;
3+
4+ export const EquipoPod : React . FC = async ( ) => {
5+ const developers = await getDeveloperListCached ( ) ;
6+ return < EquipoComponent developers = { developers } /> ;
7+ } ;
Original file line number Diff line number Diff line change 1+ export { EquipoPod } from "./equipo.pod" ;
You can’t perform that action at this time.
0 commit comments