Skip to content

Commit

Permalink
refactor: Append Icon to lucide icon names, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroWave022 committed Sep 19, 2024
1 parent 849926e commit 1625305
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"shoppingCart": {
"title": "Shopping Cart",
"productId": "Product id",
"productId": "Product ID",
"productName": "Product Name",
"location": "Location",
"unitsAvailable": "Units available",
Expand Down
2 changes: 1 addition & 1 deletion messages/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"shoppingCart": {
"title": "Handlekurv",
"productId": "Produkt id",
"productId": "Produkt-ID",
"productName": "Produktnavn",
"location": "Plass",
"unitsAvailable": "Stk tilgjengelig",
Expand Down
4 changes: 2 additions & 2 deletions src/app/[locale]/(default)/storage/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/Tooltip';
import { ShoppingCart } from 'lucide-react';
import { ShoppingCartIcon } from 'lucide-react';

import { CategorySelector } from '@/components/storage/CategorySelector';
import { SortSelector } from '@/components/storage/SortSelector';
Expand Down Expand Up @@ -87,7 +87,7 @@ export default function StoragePage({
<Link href='/storage/shopping-cart'>
<TooltipTrigger asChild>
<Button className='absolute right-0 bottom-0 md:right-5'>
<ShoppingCart />
<ShoppingCartIcon />
</Button>
</TooltipTrigger>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions src/app/[locale]/(default)/storage/shopping-cart/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ShoppingCartClearButton } from '@/components/storage/ShoppingCartClearB
import { ShoppingCartTable } from '@/components/storage/ShoppingCartTable';
import { Button } from '@/components/ui/Button';
import { Link } from '@/lib/locale/navigation';
import { ArrowLeft } from 'lucide-react';
import { ArrowLeftIcon } from 'lucide-react';
import { useTranslations } from 'next-intl';
import { unstable_setRequestLocale } from 'next-intl/server';

Expand Down Expand Up @@ -45,7 +45,7 @@ export default function StorageShoppingCartPage({
<div className='my-4 flex justify-center gap-2'>
<Link href='/storage'>
<Button className='flex gap-2'>
<ArrowLeft />
<ArrowLeftIcon />
{t('backToStorage')}
</Button>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions src/components/storage/LoanForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const formSchema = z.object({
returnBy: z.date().min(new Date()),
});

type LoanFormParams = {
type LoanFormProps = {
t: {
borrowNow: string;
name: string;
Expand All @@ -38,7 +38,7 @@ type LoanFormParams = {
};
};

function LoanForm({ t }: LoanFormParams) {
function LoanForm({ t }: LoanFormProps) {
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/storage/ShoppingCartClearButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Button } from '@/components/ui/Button';
import { X } from 'lucide-react';
import { XIcon } from 'lucide-react';
import { useLocalStorage } from 'usehooks-ts';

function ShoppingCartClearButton({ caption }: { caption: string }) {
Expand All @@ -21,7 +21,7 @@ function ShoppingCartClearButton({ caption }: { caption: string }) {
variant='destructive'
onClick={() => clearCart()}
>
<X />
<XIcon />
{caption}
</Button>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/storage/ShoppingCartTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TableHeader,
TableRow,
} from '@/components/ui/Table';
import { X } from 'lucide-react';
import { XIcon } from 'lucide-react';
import { useLocalStorage } from 'usehooks-ts';

// TODO: Must be replaced by requesting the data from a database.
Expand Down Expand Up @@ -74,7 +74,7 @@ function ShoppingCartTable({ messages }: ShoppingCartTableProps) {
className='h-8 p-1'
onClick={() => removeItem(item.id)}
>
<X />
<XIcon />
</Button>
</TableCell>
</TableRow>
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { ChevronLeft, ChevronRight } from 'lucide-react';
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
import type * as React from 'react';
import { DayPicker } from 'react-day-picker';

Expand Down Expand Up @@ -55,8 +55,8 @@ function Calendar({
...classNames,
}}
components={{
IconLeft: ({ ...props }) => <ChevronLeft className='h-4 w-4' />,
IconRight: ({ ...props }) => <ChevronRight className='h-4 w-4' />,
IconLeft: ({ ...props }) => <ChevronLeftIcon className='h-4 w-4' />,
IconRight: ({ ...props }) => <ChevronRightIcon className='h-4 w-4' />,
}}
weekStartsOn={1}
{...props}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { format } from 'date-fns';
import { Calendar as CalendarIcon } from 'lucide-react';
import { CalendarIcon } from 'lucide-react';
import * as React from 'react';

import { Button } from '@/components/ui/Button';
Expand Down

0 comments on commit 1625305

Please sign in to comment.