[MainView] Loading 정상 작동 처리
Detail Notes : 1. import 삭제된 부분 추가
This commit is contained in:
@@ -1,39 +1,33 @@
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||
|
||||
import classNames from 'classnames';
|
||||
import {
|
||||
useDispatch,
|
||||
useSelector,
|
||||
} from 'react-redux';
|
||||
import classNames from "classnames";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
import platform from '@enact/core/platform';
|
||||
import Spotlight from '@enact/spotlight';
|
||||
import platform from "@enact/core/platform";
|
||||
import Spotlight from "@enact/spotlight";
|
||||
|
||||
// 테스트용 - TODO: 메인 홈 화면에 나와야 하는 이미지들 추가 후 preloadImages에 추가
|
||||
import testImage from '../../../assets/images/img-banner-myinfo-login@3x.png';
|
||||
import { changeAppStatus } from '../../actions/commonActions';
|
||||
import PreloadImage from '../../components/PreloadImage/PreloadImage';
|
||||
import TabLayout from '../../components/TabLayout/TabLayout';
|
||||
import * as Config from '../../utils/Config';
|
||||
import CartPanel from '../CartPanel/CartPanel';
|
||||
import CategoryPanel from '../CategoryPanel/CategoryPanel';
|
||||
import DebugPanel from '../DebugPanel/DebugPanel';
|
||||
import DetailPanel from '../DetailPanel/DetailPanel';
|
||||
import ErrorPanel from '../ErrorPanel/ErrorPanel';
|
||||
import FeaturedBrandsPanel from '../FeaturedBrandsPanel/FeaturedBrandsPanel';
|
||||
import HomePanel from '../HomePanel/HomePanel';
|
||||
import HotPicksPanel from '../HotPicksPanel/HotPicksPanel';
|
||||
import IntroPanel from '../IntroPanel/IntroPanel';
|
||||
import MyPagePanel from '../MyPagePanel/MyPagePanel';
|
||||
import OnSalePanel from '../OnSalePanel/OnSalePanel';
|
||||
import SearchPanel from '../SearchPanel/SearchPanel';
|
||||
import TrendingNowPanel from '../TrendingNowPanel/TrendingNowPanel';
|
||||
import css from './MainView.module.less';
|
||||
import testImage from "../../../assets/images/img-banner-myinfo-login@3x.png";
|
||||
import { changeAppStatus } from "../../actions/commonActions";
|
||||
import { pushPanel } from "../../actions/panelActions";
|
||||
import PreloadImage from "../../components/PreloadImage/PreloadImage";
|
||||
import TabLayout from "../../components/TabLayout/TabLayout";
|
||||
import * as Config from "../../utils/Config";
|
||||
import CartPanel from "../CartPanel/CartPanel";
|
||||
import CategoryPanel from "../CategoryPanel/CategoryPanel";
|
||||
import DebugPanel from "../DebugPanel/DebugPanel";
|
||||
import DetailPanel from "../DetailPanel/DetailPanel";
|
||||
import ErrorPanel from "../ErrorPanel/ErrorPanel";
|
||||
import FeaturedBrandsPanel from "../FeaturedBrandsPanel/FeaturedBrandsPanel";
|
||||
import HomePanel from "../HomePanel/HomePanel";
|
||||
import HotPicksPanel from "../HotPicksPanel/HotPicksPanel";
|
||||
import IntroPanel from "../IntroPanel/IntroPanel";
|
||||
import LoadingPanel from "../LoadingPanel/LoadingPanel";
|
||||
import MyPagePanel from "../MyPagePanel/MyPagePanel";
|
||||
import OnSalePanel from "../OnSalePanel/OnSalePanel";
|
||||
import SearchPanel from "../SearchPanel/SearchPanel";
|
||||
import TrendingNowPanel from "../TrendingNowPanel/TrendingNowPanel";
|
||||
import css from "./MainView.module.less";
|
||||
|
||||
const preloadImages = [testImage];
|
||||
|
||||
@@ -68,7 +62,7 @@ export default function MainView() {
|
||||
|
||||
const onPreImageLoadComplete = useCallback(() => {
|
||||
console.log("MainView onPreImageLoadComplete");
|
||||
// dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
}, [dispatch]);
|
||||
|
||||
const renderTopPanel = useCallback(() => {
|
||||
@@ -112,9 +106,9 @@ export default function MainView() {
|
||||
if (!showLoadingPanel.show) {
|
||||
if (isTermAgreed) {
|
||||
} else {
|
||||
// dispatch(
|
||||
// pushPanel({ name: Config.panel_names.INTRO_PANEL, panelInfo: {} })
|
||||
// );
|
||||
dispatch(
|
||||
pushPanel({ name: Config.panel_names.INTRO_PANEL, panelInfo: {} })
|
||||
);
|
||||
}
|
||||
}
|
||||
}, [showLoadingPanel.show, isTermAgreed, dispatch]);
|
||||
|
||||
Reference in New Issue
Block a user