Skip to content

Commit 29b8942

Browse files
committed
fix: make hero.image.url required and remove unsafe non-null assertion
1 parent a5c3571 commit 29b8942

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

apps/web-roo-code/src/app/pr-fixer/content-a.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const content: AgentPageContent = {
1717
"As always, you bring the model key; we orchestrate smart, efficient workflows.",
1818
],
1919
image: {
20-
src: hero,
20+
url: hero.src,
2121
width: 800,
2222
height: 711,
2323
alt: "Example of a PR Fixer applying changes from review comments",

apps/web-roo-code/src/app/reviewer/content-b.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const content: AgentPageContent = {
1616
"Roo Code's PR Reviewer uses advanced reasoning models and full repository context to find the issues that slip through—before they reach production.",
1717
],
1818
image: {
19-
src: hero,
19+
url: hero.src,
2020
width: 800,
2121
height: 474,
2222
alt: "Example of a code review generated by Roo Code PR Reviewer",

apps/web-roo-code/src/app/reviewer/content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const content: AgentPageContent = {
1616
"Roo Code's PR Reviewer flips the script: you bring your own key and leverage it to the max – to find real issues, increase code quality and keep your pull request queue moving.",
1717
],
1818
image: {
19-
src: hero,
19+
url: hero.src,
2020
width: 800,
2121
height: 474,
2222
alt: "Example of a code review generated by Roo Code PR Reviewer",

apps/web-roo-code/src/app/shared/AgentLandingContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function AgentLandingContent({ content }: { content: AgentPageContent })
120120
}}>
121121
<div className="block">
122122
<Image
123-
src={content.hero.image.src || content.hero.image.url!}
123+
src={content.hero.image.url}
124124
alt={content.hero.image.alt || "Hero image"}
125125
className="max-w-full h-auto"
126126
width={content.hero.image.width}

apps/web-roo-code/src/app/shared/agent-page-content.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { StaticImageData } from "next/image"
2-
31
/**
42
* Supported icon names that can be used in agent page content.
53
* These strings are mapped to actual Lucide components in the client.
@@ -31,8 +29,7 @@ export interface AgentPageContent {
3129
heading: string
3230
paragraphs: string[]
3331
image?: {
34-
url?: string
35-
src?: StaticImageData
32+
url: string
3633
width: number
3734
height: number
3835
alt?: string

0 commit comments

Comments
 (0)