Skip to content

Commit 8d7ffd6

Browse files
authored
Merge pull request #164 from Lemoncode/feature/allow-only-description
only description
2 parents bcab037 + 65037c8 commit 8d7ffd6

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

front/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/types/routes.d.ts";
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

front/src/pods/embalse/components/reservoir-card-info.component.tsx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,33 @@ export const ReservoirCardInfo: React.FC<Props> = (props) => {
1616
>
1717
<h2 id="discover-title">Descubre el embalse {reservoirInfo?.name}</h2>
1818
<p>{reservoirInfo?.description}</p>
19-
<img
20-
className="mt-4 w-full rounded-xl md:aspect-434/171"
21-
src={reservoirInfo?.mainPicture?.url}
22-
alt={reservoirInfo?.mainPicture?.name || "Imagen del embalse"}
23-
width={200}
24-
height={100}
25-
/>
26-
{reservoirInfo?.author && (
27-
<p className="text-xs text-gray-500">
28-
Foto:{" "}
29-
{reservoirInfo.authorUrl ? (
30-
<a
31-
href={reservoirInfo.authorUrl}
32-
target="_blank"
33-
rel="noopener noreferrer"
34-
className="underline"
35-
>
36-
{reservoirInfo.author}
37-
</a>
38-
) : (
39-
reservoirInfo.author
19+
{reservoirInfo?.mainPicture?.url && (
20+
<>
21+
<img
22+
className="mt-4 w-full rounded-xl md:aspect-434/171"
23+
src={reservoirInfo.mainPicture.url}
24+
alt={reservoirInfo.mainPicture.name || "Imagen del embalse"}
25+
width={200}
26+
height={100}
27+
/>
28+
{reservoirInfo?.author && (
29+
<p className="text-xs text-gray-500">
30+
Foto:{" "}
31+
{reservoirInfo.authorUrl ? (
32+
<a
33+
href={reservoirInfo.authorUrl}
34+
target="_blank"
35+
rel="noopener noreferrer"
36+
className="underline"
37+
>
38+
{reservoirInfo.author}
39+
</a>
40+
) : (
41+
reservoirInfo.author
42+
)}
43+
</p>
4044
)}
41-
</p>
45+
</>
4246
)}
4347
</section>
4448
);

0 commit comments

Comments
 (0)