Skip to content

Commit 6f704e7

Browse files
committed
minor fixes
1 parent 58520cb commit 6f704e7

File tree

4 files changed

+66
-19
lines changed

4 files changed

+66
-19
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Pages deploy (prod & preview)
1+
name: Pages deploy
22

33
on:
44
push:

app/[lang]/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import { LangRedirect } from "@/components/lang-redirect";
1010

1111
type Params = { lang: Locale };
1212

13-
export async function generateStaticParams() {
14-
// Declaramos async para alinear con la firma nueva de Next 15 (params puede ser Promise).
13+
export function generateStaticParams() {
1514
return [{ lang: "es" }, { lang: "en" }];
1615
}
1716

app/[lang]/projects/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { notFound } from "next/navigation";
88

99
type Params = { lang: Locale; slug: string };
1010

11-
export async function generateStaticParams() {
11+
export function generateStaticParams() {
1212
const locales: Locale[] = ["es", "en"];
1313
return caseStudies.flatMap((item) =>
1414
locales.map((lang) => ({ lang, slug: item.slug }))

lib/diagrams/blocks.tsx

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
type BlockProps = {
22
label: string;
3-
accent?: 'mint' | 'blue';
3+
accent?: "mint" | "blue";
44
};
55

6-
export function DiagramBlock({ label, accent = 'mint' }: BlockProps) {
7-
const fill = accent === 'mint' ? '#5fe3c0' : '#7aa2ff';
8-
const stroke = '#1b2237';
6+
export function DiagramBlock({ label, accent = "mint" }: BlockProps) {
7+
const fill = accent === "mint" ? "#5fe3c0" : "#7aa2ff";
8+
const stroke = "#1b2237";
99
return (
10-
<svg width="180" height="72" viewBox="0 0 180 72" role="img" aria-label={label}>
11-
<rect x="5" y="4" width="170" height="64" rx="12" fill="rgba(255,255,255,0.04)" stroke={stroke} strokeWidth="2" />
10+
<svg
11+
width="200"
12+
height="72"
13+
viewBox="0 0 200 72"
14+
role="img"
15+
aria-label={label}
16+
>
17+
<rect
18+
x="5"
19+
y="4"
20+
width="190"
21+
height="64"
22+
rx="12"
23+
fill="rgba(255,255,255,0.04)"
24+
stroke={stroke}
25+
strokeWidth="2"
26+
/>
1227
<text
13-
x="90"
28+
x="100"
1429
y="40"
1530
textAnchor="middle"
1631
fontFamily="var(--font-display, 'Space Grotesk', sans-serif)"
@@ -27,17 +42,36 @@ export function DiagramBlock({ label, accent = 'mint' }: BlockProps) {
2742
type ArrowProps = {
2843
from?: string;
2944
to?: string;
30-
orientation?: 'horizontal' | 'vertical';
45+
orientation?: "horizontal" | "vertical";
3146
className?: string;
3247
};
3348

34-
export function DiagramArrow({ from, to, orientation = 'horizontal', className }: ArrowProps) {
35-
const label = [from, to].filter(Boolean).join(' → ');
36-
if (orientation === 'vertical') {
49+
export function DiagramArrow({
50+
from,
51+
to,
52+
orientation = "horizontal",
53+
className,
54+
}: ArrowProps) {
55+
const label = [from, to].filter(Boolean).join(" → ");
56+
if (orientation === "vertical") {
3757
return (
38-
<svg className={className} width="72" height="60" viewBox="0 0 72 60" role="img" aria-label={label}>
58+
<svg
59+
className={className}
60+
width="72"
61+
height="60"
62+
viewBox="0 0 72 60"
63+
role="img"
64+
aria-label={label}
65+
>
3966
<defs>
40-
<marker id="arrowhead-vert" markerWidth="8" markerHeight="8" refX="4" refY="4" orient="auto">
67+
<marker
68+
id="arrowhead-vert"
69+
markerWidth="8"
70+
markerHeight="8"
71+
refX="4"
72+
refY="4"
73+
orient="auto"
74+
>
4175
<polygon points="0 0, 8 4, 0 8" fill="#7aa2ff" />
4276
</marker>
4377
</defs>
@@ -55,9 +89,23 @@ export function DiagramArrow({ from, to, orientation = 'horizontal', className }
5589
}
5690

5791
return (
58-
<svg className={className} width="60" height="72" viewBox="0 0 60 72" role="img" aria-label={label}>
92+
<svg
93+
className={className}
94+
width="60"
95+
height="72"
96+
viewBox="0 0 60 72"
97+
role="img"
98+
aria-label={label}
99+
>
59100
<defs>
60-
<marker id="arrowhead" markerWidth="8" markerHeight="8" refX="4" refY="4" orient="auto">
101+
<marker
102+
id="arrowhead"
103+
markerWidth="8"
104+
markerHeight="8"
105+
refX="4"
106+
refY="4"
107+
orient="auto"
108+
>
61109
<polygon points="0 0, 8 4, 0 8" fill="#7aa2ff" />
62110
</marker>
63111
</defs>

0 commit comments

Comments
 (0)