mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-31 19:18:26 +01:00
fix(typescript): resolve 44 TypeScript errors in core components (#1004)
This commit is contained in:
@@ -48,7 +48,7 @@ export const CastAndCrew: React.FC<Props> = ({ item, loading, ...props }) => {
|
||||
</Text>
|
||||
<HorizontalScroll
|
||||
loading={loading}
|
||||
keyExtractor={(i, _idx) => i.Id.toString()}
|
||||
keyExtractor={(i, _idx) => i.Id?.toString() || ""}
|
||||
height={247}
|
||||
data={destinctPeople}
|
||||
renderItem={(i) => (
|
||||
@@ -60,7 +60,7 @@ export const CastAndCrew: React.FC<Props> = ({ item, loading, ...props }) => {
|
||||
}}
|
||||
className='flex flex-col w-28'
|
||||
>
|
||||
<Poster id={i.id} url={getPrimaryImageUrl({ api, item: i })} />
|
||||
<Poster id={i.Id} url={getPrimaryImageUrl({ api, item: i })} />
|
||||
<Text className='mt-2'>{i.Name}</Text>
|
||||
<Text className='text-xs opacity-50'>{i.Role}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
@@ -28,15 +28,17 @@ export const CurrentSeries: React.FC<Props> = ({ item, ...props }) => {
|
||||
height={247}
|
||||
renderItem={(item, _index) => (
|
||||
<TouchableOpacity
|
||||
key={item.Id}
|
||||
onPress={() => router.push(`/series/${item.SeriesId}`)}
|
||||
key={item?.Id}
|
||||
onPress={() =>
|
||||
item?.SeriesId && router.push(`/series/${item.SeriesId}`)
|
||||
}
|
||||
className='flex flex-col space-y-2 w-28'
|
||||
>
|
||||
<Poster
|
||||
id={item.id}
|
||||
url={getPrimaryImageUrlById({ api, id: item.ParentId })}
|
||||
id={item?.Id}
|
||||
url={getPrimaryImageUrlById({ api, id: item?.ParentId })}
|
||||
/>
|
||||
<Text>{item.SeriesName}</Text>
|
||||
<Text>{item?.SeriesName}</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -19,7 +19,6 @@ export const EpisodeTitleHeader: React.FC<Props> = ({ item, ...props }) => {
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
router.push(
|
||||
// @ts-expect-error
|
||||
`/(auth)/series/${item.SeriesId}?seasonIndex=${item?.ParentIndexNumber}`,
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -49,7 +49,7 @@ const JellyseerrSeasonEpisodes: React.FC<{
|
||||
showsHorizontalScrollIndicator={false}
|
||||
estimatedItemSize={50}
|
||||
data={seasonWithEpisodes?.episodes}
|
||||
keyExtractor={(item) => item.id}
|
||||
keyExtractor={(item) => item.id.toString()}
|
||||
renderItem={(item, index) => (
|
||||
<RenderItem key={index} item={item} index={index} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user