Skip to content

Commit 093deb5

Browse files
committed
fix no result is printed on local csv file examples on demo page
1 parent c9d20fb commit 093deb5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/src/components/screens/Demo.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React, { useEffect, useState } from 'react';
22
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
33

44
import { usePapaParse, useCSVReader, lightenDarkenColor, formatFileSize } from 'react-papaparse';
@@ -169,6 +169,14 @@ export default function Demo() {
169169
}
170170
]`);
171171

172+
useEffect(() => {
173+
if (csvData) {
174+
console.log('---------------------------');
175+
console.log(csvData);
176+
console.log('---------------------------');
177+
}
178+
}, [csvData]);
179+
172180
const handleSelect = (index) => {
173181
setTabIndex(index);
174182
};

0 commit comments

Comments
 (0)