'use client'; import { useState } from 'react'; import { useClipboard } from '@/hooks'; import clsx from 'clsx'; // import glob from 'glob'; const importFiles = (type) => { return []; //return glob.sync(`./public/samples/${type}/*.{jpg,png}`).map((file) => file.replace('./public', '')) }; export default function SamplesPage() { const clipboard = useClipboard(); const types = [ { title: 'Avatars', list: importFiles('avatars'), }, { title: 'Photos', list: importFiles('photos'), }, { title: 'Products', list: importFiles('products'), }, { title: 'Tracks', list: importFiles('tracks'), }, ]; let [clicked, setClicked] = useState([]); return ( <> {types.map((type, i) => (

{type.title}

{type.list.map((item) => (
= 0 ? 0.2 : 1 }} onClick={() => { clipboard.copy(item); setClicked([item, ...clicked]); }} />
))}
))} ); }