Skip to content

Commit

Permalink
[DEV-2054] Fix webinar codec (#1265)
Browse files Browse the repository at this point in the history
* Fix webinar codec

* Add changeset

* Update package lock
  • Loading branch information
MarcoPonchia authored Dec 4, 2024
1 parent 94ca22c commit 7ac487f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-zebras-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": minor
---

Fix related links and webinar codec
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export type OverviewPageProps = {
}[];
};
readonly relatedLinks?: {
readonly title: string;
readonly title?: string;
readonly links: {
text: string;
href: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs-website/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type EcosystemProps = {
};

type ComingSoonDocumentationProps = {
readonly title: string;
readonly title?: string;
readonly links: readonly {
readonly text: string;
readonly href: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as t from 'io-ts/lib';
import { LinkCodec } from './LinkCodec';
import { NullToUndefinedCodec } from './NullToUndefinedCodec';

export const RelatedLinksCodec = t.type({
title: t.string,
title: t.union([NullToUndefinedCodec, t.string]),
links: t.array(LinkCodec),
});
2 changes: 1 addition & 1 deletion apps/nextjs-website/src/lib/types/webinar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export type Webinar = {
}[];
};
readonly relatedLinks?: {
readonly title: string;
readonly title?: string;
readonly links: readonly {
readonly text: string;
readonly href: string;
Expand Down
Loading

0 comments on commit 7ac487f

Please sign in to comment.