Compare commits

..

3 Commits

@ -6,12 +6,6 @@ import { eq } from 'drizzle-orm'
import { cookies } from 'next/headers' import { cookies } from 'next/headers'
import { getUser } from '@/lib/auth' import { getUser } from '@/lib/auth'
export const GET = async () => {
const bookmarks = await db.select().from(bookmark)
return NextResponse.json(bookmarks)
}
export const POST = async (request: NextRequest) => { export const POST = async (request: NextRequest) => {
const body = await request.json() const body = await request.json()
const token = cookies().get('token') const token = cookies().get('token')

@ -114,12 +114,15 @@ export default function NewBookmarkForm({
title={'Bookmark'}> title={'Bookmark'}>
<form className='flex flex-col gap-4'> <form className='flex flex-col gap-4'>
<Select <Select
label='Select category' label='Category'
placeholder='Select a category' placeholder='Select a category'
selectedKeys={value} selectedKeys={value}
onSelectionChange={setValue}> onSelectionChange={setValue}
{categories.length > 0 ? ( disabledKeys={['placeholder']}>
categories.map( <SelectSection
showDivider
title='Categories'>
{[...categories].map(
(category) => ( (category) => (
<SelectItem <SelectItem
key={ key={
@ -131,14 +134,8 @@ export default function NewBookmarkForm({
{category.name} {category.name}
</SelectItem> </SelectItem>
) )
)
) : (
<SelectItem
key={'test'}
value={'test'}>
{'test'}
</SelectItem>
)} )}
</SelectSection>
</Select> </Select>
<Input <Input
autoFocus autoFocus

@ -9,25 +9,25 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@nextui-org/avatar": "^2.0.11", "@nextui-org/avatar": "^2.0.15",
"@nextui-org/button": "2.0.0", "@nextui-org/button": "2.0.0",
"@nextui-org/card": "^2.0.11", "@nextui-org/card": "^2.0.15",
"@nextui-org/checkbox": "^2.0.12", "@nextui-org/checkbox": "^2.0.16",
"@nextui-org/code": "2.0.0", "@nextui-org/code": "2.0.0",
"@nextui-org/divider": "^2.0.10", "@nextui-org/divider": "^2.0.14",
"@nextui-org/dropdown": "^2.0.13", "@nextui-org/dropdown": "^2.1.4",
"@nextui-org/image": "^2.0.11", "@nextui-org/image": "^2.0.15",
"@nextui-org/input": "2.0.0", "@nextui-org/input": "2.0.0",
"@nextui-org/kbd": "2.0.0", "@nextui-org/kbd": "2.0.0",
"@nextui-org/link": "2.0.0", "@nextui-org/link": "2.0.0",
"@nextui-org/modal": "^2.0.13", "@nextui-org/modal": "^2.0.17",
"@nextui-org/navbar": "2.0.0", "@nextui-org/navbar": "2.0.0",
"@nextui-org/react": "^2.1.5", "@nextui-org/react": "^2.1.7",
"@nextui-org/select": "^2.1.4", "@nextui-org/select": "^2.1.5",
"@nextui-org/snippet": "2.0.0", "@nextui-org/snippet": "2.0.0",
"@nextui-org/switch": "2.0.0", "@nextui-org/switch": "2.0.0",
"@nextui-org/system": "2.0.0", "@nextui-org/system": "2.0.0",
"@nextui-org/tabs": "^2.0.11", "@nextui-org/tabs": "^2.0.15",
"@nextui-org/theme": "2.0.0", "@nextui-org/theme": "2.0.0",
"@react-aria/ssr": "^3.7.1", "@react-aria/ssr": "^3.7.1",
"@react-aria/visually-hidden": "^3.8.3", "@react-aria/visually-hidden": "^3.8.3",
@ -38,10 +38,10 @@
"autoprefixer": "10.4.14", "autoprefixer": "10.4.14",
"bcrypt": "^5.1.1", "bcrypt": "^5.1.1",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"drizzle-orm": "^0.28.2", "drizzle-orm": "^0.28.5",
"eslint": "8.41.0", "eslint": "8.41.0",
"eslint-config-next": "13.4.4", "eslint-config-next": "13.4.4",
"framer-motion": "^10.15.2", "framer-motion": "^10.16.1",
"intl-messageformat": "^10.5.0", "intl-messageformat": "^10.5.0",
"next": "13.4.9", "next": "13.4.9",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
@ -52,11 +52,11 @@
"tailwind-variants": "^0.1.13", "tailwind-variants": "^0.1.13",
"tailwindcss": "3.3.2", "tailwindcss": "3.3.2",
"typescript": "5.0.4", "typescript": "5.0.4",
"zod": "^3.22.1" "zod": "^3.22.2"
}, },
"devDependencies": { "devDependencies": {
"@iconify/react": "^4.1.1", "@iconify/react": "^4.1.1",
"drizzle-kit": "^0.19.12", "drizzle-kit": "^0.19.13",
"prettier": "^3.0.2", "prettier": "^3.0.2",
"prettier-plugin-tailwindcss": "^0.4.1" "prettier-plugin-tailwindcss": "^0.4.1"
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save