mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-24 05:54:55 +03:00
making screenshots nullable
This commit is contained in:
parent
3da751a67b
commit
7ec082be23
@ -13,7 +13,7 @@ export function GallerySlider() {
|
||||
|
||||
const { t } = useTranslation("game_details");
|
||||
|
||||
const hasScreenshots = shopDetails && shopDetails.screenshots.length;
|
||||
const hasScreenshots = shopDetails && shopDetails.screenshots?.length;
|
||||
const hasMovies = shopDetails && shopDetails.movies?.length;
|
||||
|
||||
const mediaCount = useMemo(() => {
|
||||
@ -77,7 +77,7 @@ export function GallerySlider() {
|
||||
|
||||
const previews = useMemo(() => {
|
||||
const screenshotPreviews =
|
||||
shopDetails?.screenshots.map(({ id, path_thumbnail }) => ({
|
||||
shopDetails?.screenshots?.map(({ id, path_thumbnail }) => ({
|
||||
id,
|
||||
thumbnail: path_thumbnail,
|
||||
})) ?? [];
|
||||
@ -121,7 +121,7 @@ export function GallerySlider() {
|
||||
))}
|
||||
|
||||
{hasScreenshots &&
|
||||
shopDetails.screenshots.map((image, i) => (
|
||||
shopDetails.screenshots?.map((image, i) => (
|
||||
<img
|
||||
key={image.id}
|
||||
className={styles.gallerySliderMedia}
|
||||
|
@ -37,7 +37,7 @@ export interface SteamAppDetails {
|
||||
publishers: string[];
|
||||
genres: SteamGenre[];
|
||||
movies?: SteamMovies[];
|
||||
screenshots: SteamScreenshot[];
|
||||
screenshots?: SteamScreenshot[];
|
||||
pc_requirements: {
|
||||
minimum: string;
|
||||
recommended: string;
|
||||
|
Loading…
Reference in New Issue
Block a user