Skip to content

Commit b457d84

Browse files
authored
docs: add omitted types in paginationdoc.js (#8529)
1 parent f1dc3ca commit b457d84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/doc/dataview/paginationdoc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default function PaginationDemo() {
152152
}
153153
`,
154154
typescript: `
155-
import React, { useState, useEffect } from 'react';
155+
import { useState, useEffect } from 'react';
156156
import { Button } from 'primereact/button';
157157
import { DataView } from 'primereact/dataview';
158158
import { Rating } from 'primereact/rating';
@@ -196,7 +196,7 @@ export default function PaginationDemo() {
196196
}
197197
};
198198
199-
const itemTemplate = (product, index) => {
199+
const itemTemplate = (product: Product, index: number) => {
200200
return (
201201
<div className="col-12" key={product.id}>
202202
<div className={classNames('flex flex-column xl:flex-row xl:align-items-start p-4 gap-4', { 'border-top-1 surface-border': index !== 0 })}>
@@ -223,7 +223,7 @@ export default function PaginationDemo() {
223223
);
224224
};
225225
226-
const listTemplate = (items: Product) => {
226+
const listTemplate = (items: Product[]) => {
227227
if (!items || items.length === 0) return null;
228228
229229
let list = items.map((product, index) => {

0 commit comments

Comments
 (0)