Skip to content

Commit 2ac6a1b

Browse files
committed
fix: resolve undefined values
1 parent f564df5 commit 2ac6a1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/[locale]/(main)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const getTopBanner = async () => {
3232
query: GET_TOP_BANNER,
3333
});
3434

35-
const _item = data?.sliderCategories?.nodes?.[0].sliders?.edges?.[0]?.node;
35+
const _item = data?.sliderCategories?.nodes?.[0]?.sliders?.edges?.[0]?.node;
3636
if (_item && _item?.featuredImage?.node.url) {
3737
const data: ISliderItem = {
3838
id: _item.id,

src/components/MainCategories/MainCategories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import { ChevronLeft } from '@mui/icons-material';
44
import { Box, Grid, Link, Stack } from '@mui/material';
55
import { grey } from '@mui/material/colors';
6-
import Image from 'next/image';
76
import React, { FC } from 'react';
7+
import Image from '../common/Image';
88

99
export interface IMainCategory {
1010
id: number | string;

0 commit comments

Comments
 (0)