Skip to content

Commit

Permalink
fix: react warning about keys in AllHighlights
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Dec 28, 2024
1 parent cf22efa commit 98c3c0d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions apps/web/components/dashboard/highlights/AllHighlights.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { useEffect } from "react";
import React, { useEffect } from "react";
import Link from "next/link";
import { ActionButton } from "@/components/ui/action-button";
import useRelativeTime from "@/lib/hooks/relative-time";
Expand Down Expand Up @@ -75,13 +75,10 @@ export default function AllHighlights({
{allHighlights &&
allHighlights.length > 0 &&
allHighlights.map((h) => (
<>
<Highlight key={h.id} highlight={h} />
<Separator
key={`sep-${h.id}`}
className="m-2 h-0.5 bg-gray-100 last:hidden"
/>
</>
<React.Fragment key={h.id}>
<Highlight highlight={h} />
<Separator className="m-2 h-0.5 bg-gray-100 last:hidden" />
</React.Fragment>
))}
{allHighlights && allHighlights.length == 0 && (
<p className="rounded-md bg-muted p-2 text-sm text-muted-foreground">
Expand Down

0 comments on commit 98c3c0d

Please sign in to comment.