Skip to content

Commit 072f234

Browse files
committed
refactor: move utility function to a new file and update imports
- Deleted the old tailwind.utils.ts file and moved the 'cn' function to utils.ts as is the default convention. - Updated all component imports to reference the new utils.ts file instead of the deleted tailwind.utils.ts. - Adjusted image quality settings in the Header and NoteBlockWorldLogo components for improved performance.
1 parent 15f117a commit 072f234

File tree

16 files changed

+17
-16
lines changed

16 files changed

+17
-16
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ClassValue, clsx } from 'clsx';
1+
import { clsx, type ClassValue } from 'clsx';
22
import { twMerge } from 'tailwind-merge';
33

44
export function cn(...inputs: ClassValue[]) {

apps/frontend/src/modules/shared/components/NoteBlockWorldLogo.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Image from 'next/image';
22

3-
import { cn } from '@web/lib/tailwind.utils';
3+
import { cn } from '@web/lib/utils';
44

55
export const NoteBlockWorldLogo = ({
66
size,
@@ -37,6 +37,7 @@ export const NoteBlockWorldLogo = ({
3737
>
3838
<Image
3939
src='/nbw-color.png'
40+
quality={75}
4041
alt='Note Block World logo'
4142
width={size}
4243
height={size}

apps/frontend/src/modules/shared/components/client/Carousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
useState,
2121
} from 'react';
2222

23-
import { cn } from '../../../../lib/tailwind.utils';
23+
import { cn } from '@web/lib/utils';
2424

2525
export type CarouselApi = UseEmblaCarouselType[1];
2626
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;

apps/frontend/src/modules/shared/components/client/Command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
55
import { Command as CommandPrimitive } from 'cmdk';
66
import * as React from 'react';
77

8-
import { cn } from '../../../../lib/tailwind.utils';
8+
import { cn } from '@web/lib/utils';
99

1010
const Command = React.forwardRef<
1111
React.ElementRef<typeof CommandPrimitive>,

apps/frontend/src/modules/shared/components/client/FormElements.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ComponentPropsWithoutRef, ElementRef, forwardRef } from 'react';
55
import Skeleton from 'react-loading-skeleton';
66
import Markdown from 'react-markdown';
77

8-
import { cn } from '@web/lib/tailwind.utils';
8+
import { cn } from '@web/lib/utils';
99
import { ErrorBalloon } from '@web/modules/shared/components/client/ErrorBalloon';
1010

1111
import { Tooltip, TooltipContent, TooltipTrigger } from '../tooltip';

apps/frontend/src/modules/shared/components/client/Popover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as PopoverPrimitive from '@radix-ui/react-popover';
44
import * as React from 'react';
55

6-
import { cn } from '../../../../lib/tailwind.utils';
6+
import { cn } from '@web/lib/utils';
77

88
const Popover = PopoverPrimitive.Root;
99

apps/frontend/src/modules/shared/components/client/ads/AdSlots.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
55
import Script from 'next/script';
66
import { useEffect, useState } from 'react';
77

8-
import { cn } from '@web/lib/tailwind.utils';
8+
import { cn } from '@web/lib/utils';
99

1010
import useAdSenseClient from './useAdSenseClient';
1111

apps/frontend/src/modules/shared/components/layout/BlockTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
22
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
33
import Link from 'next/link';
44

5-
import { cn } from '@web/lib/tailwind.utils';
5+
import { cn } from '@web/lib/utils';
66

77
import { MusicalNote } from './MusicalNote';
88

apps/frontend/src/modules/shared/components/layout/CopyrightFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Link from 'next/link';
22

3-
import { cn } from '@web/lib/tailwind.utils';
3+
import { cn } from '@web/lib/utils';
44

55
export const CopyrightFooter = ({ className }: { className?: string }) => (
66
<p className={cn('mx-auto text-zinc-600 text-xs', className)}>

apps/frontend/src/modules/shared/components/layout/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function Header() {
3939
<Link href='/'>
4040
<Image
4141
unoptimized
42-
quality={100}
42+
quality={75}
4343
src='/nbw-color.png'
4444
alt='NoteBlockWorld logo'
4545
className='h-10 mx-auto my-2 aspect-square drop-shadow-[0_35px_35px_rgba(0.2,0.58,1,0.25)] hover:animate-[nbw-glow_3s_ease-in-out_infinite]'

0 commit comments

Comments
 (0)