Skip to content

Commit 0dc5269

Browse files
Refactor import @nextui-org/react to fix #189 (#192)
1 parent b4fa0c8 commit 0dc5269

File tree

52 files changed

+197
-166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+197
-166
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"editor.tabSize": 2,
33
"editor.detectIndentation": false,
4-
"editor.insertSpaces": true
4+
"editor.insertSpaces": true,
5+
"cSpell.words": ["dexie", "nextui"]
56
}

src/app/(authenticated user)/dashboard/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import React, { useState } from 'react'
44
import { Card, CardBody } from '@nextui-org/card'
5-
import { Select, SelectItem } from '@nextui-org/react'
5+
import { Select, SelectItem } from '@nextui-org/select'
66

77
import LineChart from '@/components/line-chart'
88
import BarChart from '@/components/bar-chart'

src/app/(authenticated user)/data/products/(form)/_components/page-template.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
'use client'
22

33
// vendors
4-
import {
5-
Button,
6-
Card,
7-
CardBody,
8-
CardFooter,
9-
CardHeader,
10-
} from '@nextui-org/react'
4+
import { Button } from '@nextui-org/button'
5+
import { Card, CardBody, CardFooter, CardHeader } from '@nextui-org/card'
116
// sub-components
127
import { ProductForm } from '@/app/(authenticated user)/data/products/(form)/_components/product-form'
138
import { useHook as updateUseHook } from '../[uuid]/_hook'

src/app/(authenticated user)/data/products/(form)/_components/product-form/icon-button-input-content.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import type { ForwardRefExoticComponent, RefAttributes } from 'react'
33
import type { LucideProps } from 'lucide-react'
44
// vendors
5-
import { Button, ButtonProps, Tooltip } from '@nextui-org/react'
5+
import { Button, ButtonProps } from '@nextui-org/button'
6+
import { Tooltip } from '@nextui-org/tooltip'
67

78
export function IconButtonInputContent({
89
text,

src/app/(authenticated user)/data/products/(form)/_components/product-form/product-form.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import {
55
Autocomplete,
66
AutocompleteItem,
77
AutocompleteSection,
8-
Input,
9-
Textarea,
10-
} from '@nextui-org/react'
8+
} from '@nextui-org/autocomplete'
9+
import { Input, Textarea } from '@nextui-org/input'
1110
import { CameraIcon, InfoIcon } from 'lucide-react'
1211
import BarcodeReader from 'react-barcode-reader'
1312
// components

src/app/(authenticated user)/data/products/_components/product-card/product-card.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
// types
44
import type { Product } from '@/models/table-types/product'
55
// vendors
6+
import { Button } from '@nextui-org/button'
7+
import { Card, CardBody, type CardProps } from '@nextui-org/card'
8+
import { Chip } from '@nextui-org/chip'
69
import {
7-
Card,
8-
CardBody,
9-
Image,
10-
CardProps,
11-
Chip,
12-
Button,
1310
Dropdown,
1411
DropdownTrigger,
1512
DropdownMenu,
1613
DropdownItem,
17-
} from '@nextui-org/react'
14+
} from '@nextui-org/dropdown'
15+
import { Image } from '@nextui-org/image'
1816
import { EditIcon, MoreVerticalIcon, TrashIcon } from 'lucide-react'
1917
import Link from 'next/link'
2018
// etc

src/app/(authenticated user)/data/products/page.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
'use client'
22

33
// vendors
4-
import {
5-
Button,
6-
// ButtonGroup,
7-
Card,
8-
CardBody,
9-
Chip,
10-
Input,
11-
Link,
12-
Select,
13-
SelectItem,
14-
} from '@nextui-org/react'
4+
import { Button } from '@nextui-org/button'
5+
import { Card, CardBody } from '@nextui-org/card'
6+
import { Chip } from '@nextui-org/chip'
7+
import { Input } from '@nextui-org/input'
8+
import { Link } from '@nextui-org/link'
9+
import { Select, SelectItem } from '@nextui-org/select'
1510
import {
1611
Barcode,
1712
// LayoutGridIcon, List,

src/app/(authenticated user)/data/users/(form)/_components/form.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
'use client'
22

3-
import { Button, Checkbox, CheckboxGroup, Input } from '@nextui-org/react'
3+
// vendors
4+
import { Button } from '@nextui-org/button'
5+
import { Checkbox, CheckboxGroup } from '@nextui-org/checkbox'
46
import { Controller } from 'react-hook-form'
7+
import { Input } from '@nextui-org/input'
8+
//
59
import { Role } from '@/enums/role'
610
import { PERMISSION_TEMPLATES } from '@/data/permission-templates'
711
import { useHook as useCreateHook } from '../create/hook'

src/app/(authenticated user)/data/users/page.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
'use client'
22

3-
import PageUrlEnum from '@/enums/page-url'
4-
import Link from 'next/link'
3+
// vendors
4+
import { Button } from '@nextui-org/button'
5+
import { Chip } from '@nextui-org/chip'
6+
import { Switch } from '@nextui-org/switch'
57
import {
6-
Button,
7-
Chip,
8-
Switch,
98
Table,
109
TableBody,
1110
TableCell,
1211
TableColumn,
1312
TableHeader,
1413
TableRow,
15-
} from '@nextui-org/react'
16-
import { useHook } from './hook'
14+
} from '@nextui-org/table'
15+
import Link from 'next/link'
16+
// icons
1717
import { EditIcon } from 'lucide-react'
18+
//
19+
import { useHook } from './hook'
20+
import PageUrlEnum from '@/enums/page-url'
1821

1922
export default function Page() {
2023
const { users, setUserActiveStatus } = useHook()

src/app/(authenticated user)/data/warehouses/(form)/create/page.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
'use client'
22

33
// vendors
4-
import {
5-
Button,
6-
Card,
7-
CardBody,
8-
CardFooter,
9-
CardHeader,
10-
Input,
11-
Textarea,
12-
} from '@nextui-org/react'
4+
import { Button } from '@nextui-org/button'
5+
import { Card, CardBody, CardFooter, CardHeader } from '@nextui-org/card'
6+
import { Input, Textarea } from '@nextui-org/input'
137
import { useRouter } from 'next/navigation'
148
import { Controller, useForm } from 'react-hook-form'
159
// functions

0 commit comments

Comments
 (0)