@daeryun/dr_components 1.2.55 → 1.2.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,21 +2,16 @@ import { useEffect, useMemo, useRef, useState } from 'react';
2
2
  import { Swiper } from 'swiper';
3
3
  import Link from 'next/link';
4
4
  import Image from 'next/image';
5
- import { tempData } from './common';
6
5
  import useBrowser from '../hook/useBrowser';
7
6
  import { Autoplay } from 'swiper/modules';
8
7
  const MobileTopBanner = ({ popup, setMobileOpen, addClickCnt }) => {
9
8
  const { width } = useBrowser(true);
10
9
  const swiper = useRef(null);
11
10
  const [index, setIndex] = useState(1);
12
- // const currentPopup = useMemo(() => {
13
- // if (width === 0) return []
14
- // return popup.filter((item) => item.file_type === (width >= 640 ? 'file_tab' : 'file_mobile'))
15
- // }, [popup, width])
16
11
  const currentPopup = useMemo(() => {
17
12
  if (width === 0)
18
13
  return [];
19
- return tempData.filter(item => item.file_type === (width >= 480 ? 'file_tab' : 'file_mobile'));
14
+ return popup.filter(item => item.file_type === (width >= 640 ? 'file_tab' : 'file_mobile'));
20
15
  }, [popup, width]);
21
16
  //이미지 패스
22
17
  const ImagePath = process.env.NEXT_PUBLIC_S3_URL + '';
@@ -3,8 +3,6 @@ import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { Swiper } from 'swiper';
4
4
  import Link from 'next/link';
5
5
  import Image from 'next/image';
6
- import { useTranslation } from 'next-i18next';
7
- import { tempData } from './common';
8
6
  import useBrowser from '../hook/useBrowser';
9
7
  import { Autoplay } from 'swiper/modules';
10
8
 
@@ -20,15 +18,10 @@ const MobileTopBanner = ({
20
18
  const { width } = useBrowser(true);
21
19
  const swiper = useRef<Swiper | null>(null);
22
20
  const [index, setIndex] = useState(1);
23
- // const currentPopup = useMemo(() => {
24
- // if (width === 0) return []
25
- // return popup.filter((item) => item.file_type === (width >= 640 ? 'file_tab' : 'file_mobile'))
26
- // }, [popup, width])
27
21
  const currentPopup = useMemo(() => {
28
22
  if (width === 0) return [];
29
- return tempData.filter(item => item.file_type === (width >= 480 ? 'file_tab' : 'file_mobile'));
23
+ return popup.filter(item => item.file_type === (width >= 640 ? 'file_tab' : 'file_mobile'));
30
24
  }, [popup, width]);
31
-
32
25
  //이미지 패스
33
26
  const ImagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
34
27
 
@@ -84,7 +84,7 @@ import { isTopPopupMobileHidden } from './common';
84
84
  const TopBanner = ({ setBannerHeight }) => {
85
85
  //이미지 패스
86
86
  const ImagePath = process.env.NEXT_PUBLIC_S3_URL + '';
87
- const { width } = useBrowser();
87
+ const { width } = useBrowser(true);
88
88
  const bannerRef = useRef(null);
89
89
  const router = useRouter();
90
90
  const pathname = usePathname();
@@ -108,7 +108,7 @@ export interface IBannerTypes {
108
108
  const TopBanner = ({ setBannerHeight }: { setBannerHeight?: SetterOrUpdater<number> }) => {
109
109
  //이미지 패스
110
110
  const ImagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
111
- const { width } = useBrowser();
111
+ const { width } = useBrowser(true);
112
112
  const bannerRef = useRef<HTMLDivElement>(null);
113
113
  const router = useRouter();
114
114
  const pathname = usePathname();