Skip to content

Commit

Permalink
chore: import useId alone like other hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbrusegard committed Sep 22, 2024
1 parent c227353 commit 17afc70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/news/CardGridSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Skeleton } from '@/components/ui/Skeleton';
import { cx } from '@/lib/utils';
import * as React from 'react';
import { useId } from 'react';

function CardGridSkeleton() {
return (
Expand All @@ -13,7 +13,7 @@ function CardGridSkeleton() {
index === 1 && 'col-span-1 row-span-1 md:col-span-2',
index === 3 && 'xs:col-span-2 row-span-1 md:col-span-1',
)}
key={React.useId()}
key={useId()}
/>
))}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/news/ItemGridSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ArticleItemSkeleton } from '@/components/news/ArticleItemSkeleton';
import * as React from 'react';
import { useId } from 'react';

function ItemGridSkeleton() {
return (
<div className='grid min-h-[752px] grid-cols-1 gap-4 sm:min-h-[368px] sm:grid-cols-2 lg:min-h-[240px] lg:grid-cols-3'>
{Array.from({ length: 6 }).map(() => (
<ArticleItemSkeleton key={React.useId()} />
<ArticleItemSkeleton key={useId()} />
))}
</div>
);
Expand Down

0 comments on commit 17afc70

Please sign in to comment.