Skip to content

Commit a2a998e

Browse files
committed
deploy
1 parent 8dbb817 commit a2a998e

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

src/pages/components/section/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface Props {
66
maxWidth?: string; // Optional max-width to prevent full-screen width
77
}
88
9-
const { id, title, padding = "3rem", maxWidth = "800px" } = Astro.props;
9+
const { id, title, padding = "3rem", maxWidth = "1200px" } = Astro.props;
1010
---
1111

1212
<style>
@@ -26,7 +26,7 @@ const { id, title, padding = "3rem", maxWidth = "800px" } = Astro.props;
2626

2727
:root {
2828
--section-padding: 3rem;
29-
--section-max-width: 800px;
29+
--section-max-width: 1000px;
3030
}
3131
</style>
3232

src/pages/index.astro

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ import Layout from "./components/layout/index.astro";
55
import NavigationMenu from "./components/menu/index.astro";
66
import Section from "./components/section/index.astro";
77
8-
const menuItems = [
9-
...data.sections.map((section, index) => ({
10-
title: section.title,
11-
index: section.title,
12-
href: `#${section.title}`,
13-
})),
14-
];
8+
//Safely access data.sections and use an empty array as a fallback
9+
const menuItems = data.sections
10+
? data.sections.map((section, index) => ({
11+
title: section.title,
12+
index: section.title,
13+
href: `#${section.title}`,
14+
}))
15+
: [];
1516
16-
const sectionsData = data.sections.map((section) => ({
17-
title: section.title,
18-
description: section.description,
19-
image: section.image,
20-
subSections: section.subSections,
21-
}));
17+
//Safely access data.sections and use an empty array as a fallback
18+
const sectionsData = data.sections
19+
? data.sections.map((section) => ({
20+
title: section.title,
21+
description: section.description,
22+
image: section.image,
23+
subSections: section.subSections,
24+
}))
25+
: [];
2226
---
2327

2428
<Layout title="Laundry Admin App Documents">

0 commit comments

Comments
 (0)