File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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';
156156import { Button } from 'primereact/button';
157157import { DataView } from 'primereact/dataview';
158158import { 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) => {
You can’t perform that action at this time.
0 commit comments