mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
making screenshots nullable
This commit is contained in:
parent
3da751a67b
commit
7ec082be23
2 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ export function GallerySlider() {
|
||||||
|
|
||||||
const { t } = useTranslation("game_details");
|
const { t } = useTranslation("game_details");
|
||||||
|
|
||||||
const hasScreenshots = shopDetails && shopDetails.screenshots.length;
|
const hasScreenshots = shopDetails && shopDetails.screenshots?.length;
|
||||||
const hasMovies = shopDetails && shopDetails.movies?.length;
|
const hasMovies = shopDetails && shopDetails.movies?.length;
|
||||||
|
|
||||||
const mediaCount = useMemo(() => {
|
const mediaCount = useMemo(() => {
|
||||||
|
@ -77,7 +77,7 @@ export function GallerySlider() {
|
||||||
|
|
||||||
const previews = useMemo(() => {
|
const previews = useMemo(() => {
|
||||||
const screenshotPreviews =
|
const screenshotPreviews =
|
||||||
shopDetails?.screenshots.map(({ id, path_thumbnail }) => ({
|
shopDetails?.screenshots?.map(({ id, path_thumbnail }) => ({
|
||||||
id,
|
id,
|
||||||
thumbnail: path_thumbnail,
|
thumbnail: path_thumbnail,
|
||||||
})) ?? [];
|
})) ?? [];
|
||||||
|
@ -121,7 +121,7 @@ export function GallerySlider() {
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{hasScreenshots &&
|
{hasScreenshots &&
|
||||||
shopDetails.screenshots.map((image, i) => (
|
shopDetails.screenshots?.map((image, i) => (
|
||||||
<img
|
<img
|
||||||
key={image.id}
|
key={image.id}
|
||||||
className={styles.gallerySliderMedia}
|
className={styles.gallerySliderMedia}
|
||||||
|
|
|
@ -37,7 +37,7 @@ export interface SteamAppDetails {
|
||||||
publishers: string[];
|
publishers: string[];
|
||||||
genres: SteamGenre[];
|
genres: SteamGenre[];
|
||||||
movies?: SteamMovies[];
|
movies?: SteamMovies[];
|
||||||
screenshots: SteamScreenshot[];
|
screenshots?: SteamScreenshot[];
|
||||||
pc_requirements: {
|
pc_requirements: {
|
||||||
minimum: string;
|
minimum: string;
|
||||||
recommended: string;
|
recommended: string;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue