Adds the Prijzen section to the homepage

Shows the three live packages as cards with their price and what is
included. Each card links to the contact section with ?pakket=<id>, so
the contact form can preselect it. Invalid packages from the CMS are
skipped and the pakket value is only accepted when it names a package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 01:07:36 +02:00
co-authored by Claude Opus 5.5
parent 0b54a67dc4
commit 30dab1af42
32 changed files with 1250 additions and 6 deletions
+33
View File
@@ -0,0 +1,33 @@
import fc from 'fast-check';
import { describe, expect, it } from 'vitest';
import { BOOK_LABEL_MAX_NAME, bookLabel } from './bookLabel';
describe('bookLabel', () => {
it('puts short names in the visible text', () => {
expect(bookLabel('Newborn')).toEqual({ visible: 'Boek Newborn' });
expect(bookLabel('Zwangerschap')).toEqual({
visible: 'Boek Zwangerschap',
});
});
it('falls back to "Boek je shoot" with a hidden name for long names', () => {
expect(bookLabel('Bruiloft en feest')).toEqual({
visible: 'Boek je shoot',
hidden: ': Bruiloft en feest',
});
});
it('always names the package and follows the length rule (invariant)', () => {
fc.assert(
fc.property(fc.string({ maxLength: 40 }), (name) => {
const label = bookLabel(name);
expect(`${label.visible}${label.hidden ?? ''}`).toContain(name);
if (name.length <= BOOK_LABEL_MAX_NAME) {
expect(label).toEqual({ visible: `Boek ${name}` });
} else {
expect(label.visible).toBe('Boek je shoot');
}
}),
);
});
});