Skip to content

Commit

Permalink
[dashboard] Support multiple recent projects with the same title
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeromnes committed May 27, 2021
1 parent c564118 commit fda71be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/dashboard/src/workspaces/StartWorkspaceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export function StartWorkspaceModal(p: StartWorkspaceModalProps) {
const [selection, setSelection] = useState(computeSelection());
useEffect(() => setSelection(computeSelection()), [p.recent, p.selected]);

const list = (selection === 'Recent' ? p.recent : p.examples).map(e =>
<a key={e.title} href={e.startUrl} className="rounded-xl group hover:bg-gray-100 dark:hover:bg-gray-800 flex p-4 my-1">
const list = (selection === 'Recent' ? p.recent : p.examples).map((e, i) =>
<a key={`item-${i}-${e.title}`} href={e.startUrl} className="rounded-xl group hover:bg-gray-100 dark:hover:bg-gray-800 flex p-4 my-1">
<div className="w-full">
<p className="text-base text-gray-800 dark:text-gray-200 font-semibold">{e.title}</p>
<p>{e.description}</p>
Expand Down Expand Up @@ -75,4 +75,4 @@ export function StartWorkspaceModal(p: StartWorkspaceModalProps) {
</div>
</div>
</Modal>;
}
}

0 comments on commit fda71be

Please sign in to comment.