Skip to content

Commit 6068cd2

Browse files
committed
fix type issues
1 parent 3124fa5 commit 6068cd2

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎apps/codingcatdev/src/lib/components/content/Image.svelte‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
export let loader: undefined | (() => {}) = undefined;
55
export let src: string;
66
export let alt: string;
7-
export let classes: string;
7+
export let classes: string = 'object-cover w-full bg-cover rounded bg-black/50 aspect-video';
88
</script>
99

1010
{#if loader}

‎apps/codingcatdev/src/lib/types/index.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export interface Content {
1414
start: Date;
1515
sponsors?: string[];
1616
type: ContentType;
17-
title?: string;
18-
updated: Date;
17+
title: string;
18+
updated?: Date;
1919
weight?: number;
2020
youtube?: string;
2121
}
@@ -46,18 +46,18 @@ export interface Podcast extends Content {
4646
}
4747

4848
export interface Sponsor extends Content {
49-
description?: string;
50-
name?: string;
49+
description: string;
50+
name: string;
5151
url: string;
5252
}
5353

5454
export interface Author {
55-
cover?: string;
56-
name?: string;
55+
cover: string;
56+
name: string;
5757
html?: string;
5858
slug: string;
5959
start: Date;
60-
published?: ContentPublished;
60+
published: ContentPublished;
6161
socials: Socials;
6262
websites?: string[];
6363
}

‎apps/codingcatdev/src/routes/(content-single)/(non-course)/Content.svelte‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
{#key guest.slug}
4949
<Image
5050
src={guest.cover}
51-
alt={guest?.name}
51+
alt={guest.name}
5252
classes="object-cover w-full bg-cover rounded bg-black/50 aspect-square"
5353
/>
5454
{/key}
@@ -103,7 +103,7 @@
103103
{#if sponsor?.cover}
104104
<Image
105105
src={sponsor.cover}
106-
alt={sponsor?.name}
106+
alt={sponsor.name}
107107
classes="object-cover w-full bg-cover rounded bg-black/50 aspect-video"
108108
/>
109109
{/if}

0 commit comments

Comments
 (0)