@daeryun/dr_components 0.3.22 → 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.
@@ -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