You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
738 B
TypeScript

'use client'
import { BookmarkCategoryWithBookmarks } from '@/types'
import { Tabs, Tab } from '@nextui-org/tabs'
import { BookmarkCard } from './bookmarkCard'
export default function BookmarkTabs({
data,
}: {
data: BookmarkCategoryWithBookmarks[]
}) {
return (
<div className='flex w-full max-w-4xl flex-col'>
<Tabs
fullWidth
color='primary'>
{data.map((bookmarkCategory, index) => (
<Tab
key={index}
title={bookmarkCategory.name}>
<div className='mt-4 flex flex-wrap justify-center gap-6'>
{bookmarkCategory.bookmark.map((data, index) => (
<BookmarkCard
key={index}
data={data}
/>
))}
</div>
</Tab>
))}
</Tabs>
</div>
)
}