@daeryun/dr_components 0.3.21 → 0.3.23

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.
@@ -4,7 +4,7 @@ import { usePathname, useRouter } from 'next/navigation';
4
4
  import Image from 'next/image';
5
5
  import Link from 'next/link';
6
6
  const CategoryMenu = (props) => {
7
- const { t, isMargin = true, isWhite = false } = props;
7
+ const { isMargin = true, isWhite = false } = props;
8
8
  const router = useRouter();
9
9
  const pathname = usePathname();
10
10
  const [menu, setMenu] = useState({ title: '', subTitle: '', address: '' });
@@ -16,8 +16,8 @@ const CategoryMenu = (props) => {
16
16
  }
17
17
  };
18
18
  useEffect(() => {
19
- setMenu(catagoryMenuName({ url: pathname, t }));
20
- }, [pathname, t]);
19
+ setMenu(catagoryMenuName({ url: pathname }));
20
+ }, [pathname]);
21
21
  const imagePath = isWhite ? '/images/mycase/home.svg' : '/images/mycase/home.webp';
22
22
  const arrowImage = isWhite ? '/images/mycase/nav_arr.webp' : '/images/mycase/arrow_2.webp';
23
23
  const textColor = isWhite ? 'text-[#fff]' : 'text-[#333333]';
@@ -5,13 +5,13 @@ import Image from 'next/image';
5
5
  import Link from 'next/link';
6
6
 
7
7
  type CategoryMenuType = {
8
- t: (key: string) => string;
8
+ // t: (key: string) => string;
9
9
  isMargin?: boolean;
10
10
  isWhite?: boolean;
11
11
  };
12
12
 
13
13
  const CategoryMenu = (props: CategoryMenuType) => {
14
- const { t, isMargin = true, isWhite = false } = props;
14
+ const { isMargin = true, isWhite = false } = props;
15
15
  const router = useRouter();
16
16
  const pathname = usePathname();
17
17
 
@@ -25,8 +25,8 @@ const CategoryMenu = (props: CategoryMenuType) => {
25
25
  }
26
26
  };
27
27
  useEffect(() => {
28
- setMenu(catagoryMenuName({ url: pathname, t }));
29
- }, [pathname, t]);
28
+ setMenu(catagoryMenuName({ url: pathname }));
29
+ }, [pathname]);
30
30
 
31
31
  const imagePath = isWhite ? '/images/mycase/home.svg' : '/images/mycase/home.webp';
32
32
 
@@ -1,10 +1,10 @@
1
1
  import Image from 'next/image';
2
2
  import CategoryMenu from '../_breadCrumble/CategoryMenu';
3
- import { useTranslation } from 'next-i18next';
3
+ // import { useTranslation } from 'next-i18next';
4
4
  import CaseWrapper from './CaseWrapper';
5
5
  import Wrapper from '../../../../Layout/Wrapper';
6
6
  const IntroWrapper = ({ backgroundImage, backgroundTbImage, backgroundMoImage, outerClassName, title, subTitle }) => {
7
- const { t } = useTranslation('common');
7
+ // const { t } = useTranslation('common');
8
8
  return (<div className={'absolute top-[70px] w-screen min-w-[360px] md:top-[78px] md2:top-[88px] ' + outerClassName}>
9
9
  {backgroundImage ? (<>
10
10
  <Image unoptimized src={backgroundImage} alt="background" fill className="hidden object-cover lg:block"/>
@@ -14,7 +14,7 @@ const IntroWrapper = ({ backgroundImage, backgroundTbImage, backgroundMoImage, o
14
14
 
15
15
  <Wrapper>
16
16
  <div className={'w-full lg:flex lg:flex-row lg:items-center lg:justify-center'}>
17
- <CategoryMenu t={t}/>
17
+ <CategoryMenu />
18
18
  </div>
19
19
  </Wrapper>
20
20
  <CaseWrapper>
@@ -1,7 +1,7 @@
1
1
  import Image, { StaticImageData } from 'next/image';
2
2
 
3
3
  import CategoryMenu from '../_breadCrumble/CategoryMenu';
4
- import { useTranslation } from 'next-i18next';
4
+ // import { useTranslation } from 'next-i18next';
5
5
  import CaseWrapper from './CaseWrapper';
6
6
  import Wrapper from '../../../../Layout/Wrapper';
7
7
 
@@ -20,7 +20,7 @@ const IntroWrapper = ({
20
20
  title?: string;
21
21
  subTitle?: string;
22
22
  }) => {
23
- const { t } = useTranslation('common');
23
+ // const { t } = useTranslation('common');
24
24
  return (
25
25
  <div className={'absolute top-[70px] w-screen min-w-[360px] md:top-[78px] md2:top-[88px] ' + outerClassName}>
26
26
  {backgroundImage ? (
@@ -53,7 +53,7 @@ const IntroWrapper = ({
53
53
 
54
54
  <Wrapper>
55
55
  <div className={'w-full lg:flex lg:flex-row lg:items-center lg:justify-center'}>
56
- <CategoryMenu t={t} />
56
+ <CategoryMenu />
57
57
  </div>
58
58
  </Wrapper>
59
59
  <CaseWrapper>
@@ -2,7 +2,7 @@ import Pagination from 'rc-pagination';
2
2
  import 'rc-pagination/assets/index.css';
3
3
  import localeInfo from '../../_lib/pagination/locale/ko_KR';
4
4
  import Image from 'next/image';
5
- import React, { useCallback, useEffect, useState } from 'react';
5
+ import React, { useCallback, useEffect, useState, Suspense } from 'react';
6
6
  import { usePathname, useSearchParams } from 'next/navigation';
7
7
  import Link from 'next/link';
8
8
  import arrowLeft from '../../../../../asset/images/myCase/pagination/arrow_l_on.webp';
@@ -67,14 +67,16 @@ const PaginationComponent = (props) => {
67
67
  return element;
68
68
  }, [current, query]);
69
69
  // @ts-ignore
70
- return (<div className={'flex items-center justify-center'} style={{
70
+ return (<Suspense>
71
+ <div className={'flex items-center justify-center'} style={{
71
72
  marginBlock: (marginY ? marginY : 100) + 'px'
72
73
  }}>
73
- <Pagination onChange={onChange} current={current} total={total} pageSize={pageSize} locale={localeInfo} prevIcon={<Image src={arrowLeft} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'}/>} nextIcon={<Image src={arrowRight} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'}/>} jumpPrevIcon={<span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
74
- ㆍㆍㆍ
75
- </span>} jumpNextIcon={<span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
76
- ㆍㆍㆍ
77
- </span>} className={'pagination-data'} itemRender={itemRender}/>
78
- </div>);
74
+ <Pagination onChange={onChange} current={current} total={total} pageSize={pageSize} locale={localeInfo} prevIcon={<Image src={arrowLeft} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'}/>} nextIcon={<Image src={arrowRight} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'}/>} jumpPrevIcon={<span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
75
+ ㆍㆍㆍ
76
+ </span>} jumpNextIcon={<span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
77
+ ㆍㆍㆍ
78
+ </span>} className={'pagination-data'} itemRender={itemRender}/>
79
+ </div>
80
+ </Suspense>);
79
81
  };
80
82
  export default PaginationComponent;
@@ -2,7 +2,7 @@ import Pagination from 'rc-pagination';
2
2
  import 'rc-pagination/assets/index.css';
3
3
  import localeInfo from '../../_lib/pagination/locale/ko_KR';
4
4
  import Image from 'next/image';
5
- import React, { useCallback, useEffect, useState } from 'react';
5
+ import React, { useCallback, useEffect, useState, Suspense } from 'react';
6
6
  import { usePathname, useSearchParams } from 'next/navigation';
7
7
  import Link from 'next/link';
8
8
 
@@ -99,34 +99,40 @@ const PaginationComponent = (props: {
99
99
 
100
100
  // @ts-ignore
101
101
  return (
102
- <div
103
- className={'flex items-center justify-center'}
104
- style={{
105
- marginBlock: (marginY ? marginY : 100) + 'px'
106
- }}
107
- >
108
- <Pagination
109
- onChange={onChange}
110
- current={current}
111
- total={total}
112
- pageSize={pageSize}
113
- locale={localeInfo}
114
- prevIcon={<Image src={arrowLeft} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'} />}
115
- nextIcon={<Image src={arrowRight} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'} />}
116
- jumpPrevIcon={
117
- <span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
118
- ㆍㆍㆍ
119
- </span>
120
- }
121
- jumpNextIcon={
122
- <span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
123
- ㆍㆍㆍ
124
- </span>
125
- }
126
- className={'pagination-data'}
127
- itemRender={itemRender}
128
- />
129
- </div>
102
+ <Suspense>
103
+ <div
104
+ className={'flex items-center justify-center'}
105
+ style={{
106
+ marginBlock: (marginY ? marginY : 100) + 'px'
107
+ }}
108
+ >
109
+ <Pagination
110
+ onChange={onChange}
111
+ current={current}
112
+ total={total}
113
+ pageSize={pageSize}
114
+ locale={localeInfo}
115
+ prevIcon={
116
+ <Image src={arrowLeft} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'} />
117
+ }
118
+ nextIcon={
119
+ <Image src={arrowRight} width={26} height={26} alt={''} className={'max-sm:scale-[0.8]'} />
120
+ }
121
+ jumpPrevIcon={
122
+ <span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
123
+ ㆍㆍㆍ
124
+ </span>
125
+ }
126
+ jumpNextIcon={
127
+ <span className={'mr-[9px] hidden text-lg tracking-[-5px] text-[#aaa] max-sm:text-base'}>
128
+ ㆍㆍㆍ
129
+ </span>
130
+ }
131
+ className={'pagination-data'}
132
+ itemRender={itemRender}
133
+ />
134
+ </div>
135
+ </Suspense>
130
136
  );
131
137
  };
132
138
 
@@ -1,6 +1,6 @@
1
1
  export declare function catagoryMenuName({ url, t }: {
2
2
  url: string;
3
- t: any;
3
+ t?: any;
4
4
  }): {
5
5
  title: string;
6
6
  subTitle: string;
@@ -1,6 +1,6 @@
1
1
  export function catagoryMenuName({ url, t }) {
2
2
  if (url === null || url === void 0 ? void 0 : url.includes('/mycase')) {
3
- return { title: t('나의사건현황'), subTitle: t('나의사건현황'), address: 'mycase' };
3
+ return { title: '나의사건현황', subTitle: '나의사건현황', address: 'mycase' };
4
4
  }
5
5
  else {
6
6
  return { title: '', subTitle: '', address: '/' };
@@ -1,10 +1,10 @@
1
- export function catagoryMenuName({ url, t }: { url: string; t: any }): {
1
+ export function catagoryMenuName({ url, t }: { url: string; t?: any }): {
2
2
  title: string;
3
3
  subTitle: string;
4
4
  address: string;
5
5
  } {
6
6
  if (url?.includes('/mycase')) {
7
- return { title: t('나의사건현황'), subTitle: t('나의사건현황'), address: 'mycase' };
7
+ return { title: '나의사건현황', subTitle: '나의사건현황', address: 'mycase' };
8
8
  } else {
9
9
  return { title: '', subTitle: '', address: '/' };
10
10
  }