fix
Browse files- src/pages/index.tsx +5 -1
src/pages/index.tsx
CHANGED
@@ -46,7 +46,11 @@ export default function Home() {
|
|
46 |
</div>)}
|
47 |
{next ?
|
48 |
<button onClick={async () => {
|
49 |
-
const
|
|
|
|
|
|
|
|
|
50 |
setEntries([...entries, ...data]);
|
51 |
}}>more</button> : null}
|
52 |
</Stack>
|
|
|
46 |
</div>)}
|
47 |
{next ?
|
48 |
<button onClick={async () => {
|
49 |
+
const res = await fetch('https://huggingface.co' + next);
|
50 |
+
if (res.headers.get('link')) {
|
51 |
+
setNext(res.headers.get('link')!.split('>;')[0].replace('<https://huggingface.co', ''))
|
52 |
+
}
|
53 |
+
const data = await (res).json() as HF_FileEntry[];
|
54 |
setEntries([...entries, ...data]);
|
55 |
}}>more</button> : null}
|
56 |
</Stack>
|