@@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
44import { CachedImage } from "../../../components/CachedImage" ;
55import { useAppOfTheDay } from "../../../hooks/useAppOfTheDay" ;
66import type { AppStream , CategoryApp } from "../../../types" ;
7+ import hetairosLogo from "../../../assets/internalPromo/hentairos_logo.png" ;
78
89interface FeaturedSectionProps {
910 onAppSelect : ( app : CategoryApp ) => void ;
@@ -51,7 +52,17 @@ interface PromotedAppCardData {
5152}
5253
5354// Set to null to disable promoted app
54- const PROMOTED_APP : PromotedAppCardData | null = null ;
55+ const PROMOTED_APP : PromotedAppCardData | null = {
56+ appId : "io.github.N3kosempai.hetairos-ai" ,
57+ name : "Hetairos AI" ,
58+ summary : "Your AI Companion. Loyal. Intelligent. Personal." ,
59+ icon : hetairosLogo ,
60+ appStream : {
61+ id : "io.github.N3kosempai.hetairos-ai" ,
62+ name : "Hetairos AI" ,
63+ summary : "Your AI Companion. Loyal. Intelligent. Personal." ,
64+ } as AppStream ,
65+ } ;
5566
5667export const FeaturedSection = ( { onAppSelect } : FeaturedSectionProps ) => {
5768 const { t } = useTranslation ( ) ;
@@ -66,8 +77,8 @@ export const FeaturedSection = ({ onAppSelect }: FeaturedSectionProps) => {
6677 type Slide = BackendSlide | PromotedSlide ;
6778
6879 const slides : Slide [ ] = [ ] ;
69- if ( appOfTheDay ) slides . push ( { type : "backend" , data : appOfTheDay } ) ;
7080 if ( PROMOTED_APP ) slides . push ( { type : "promoted" , data : PROMOTED_APP } ) ;
81+ if ( appOfTheDay ) slides . push ( { type : "backend" , data : appOfTheDay } ) ;
7182
7283 const totalSlides = slides . length ;
7384
@@ -211,30 +222,32 @@ export const FeaturedSection = ({ onAppSelect }: FeaturedSectionProps) => {
211222 overflow : "hidden" ,
212223 } }
213224 >
214- < CachedImage
215- appId = {
216- currentSlide . type === "backend"
217- ? currentSlide . data ?. app_id || ""
218- : currentSlide . data . appId
219- }
220- imageUrl = {
221- currentSlide . type === "backend"
222- ? currentSlide . data ?. icon || ""
223- : currentSlide . data . icon
224- }
225- alt = {
226- currentSlide . type === "backend"
227- ? currentSlide . data ?. name ||
228- currentSlide . data ?. app_id ||
229- ""
230- : currentSlide . data . name
231- }
232- style = { {
233- width : "100%" ,
234- height : "100%" ,
235- objectFit : "contain" ,
236- } }
237- />
225+ { currentSlide . type === "promoted" ? (
226+ < img
227+ src = { currentSlide . data . icon }
228+ alt = { currentSlide . data . name }
229+ style = { {
230+ width : "100%" ,
231+ height : "100%" ,
232+ objectFit : "contain" ,
233+ } }
234+ />
235+ ) : (
236+ < CachedImage
237+ appId = { currentSlide . data ?. app_id || "" }
238+ imageUrl = { currentSlide . data ?. icon || "" }
239+ alt = {
240+ currentSlide . data ?. name ||
241+ currentSlide . data ?. app_id ||
242+ ""
243+ }
244+ style = { {
245+ width : "100%" ,
246+ height : "100%" ,
247+ objectFit : "contain" ,
248+ } }
249+ />
250+ ) }
238251 </ Box >
239252 </ Box >
240253
0 commit comments