Skip to content

Commit

Permalink
search-result: provide key to part of community array element
Browse files Browse the repository at this point in the history
  • Loading branch information
fenekku committed Sep 9, 2024
1 parent 56893c6 commit ebc4c8d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Invenio App RDM is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.

import React from "react";
import React, { Fragment } from "react";
import PropTypes from "prop-types";
import { i18next } from "@translations/invenio_app_rdm/i18next";

Expand All @@ -20,12 +20,12 @@ export const DisplayPartOfCommunities = ({ communities }) => {
{i18next.t("Part of ")}
{communitiesEntries.map((community, index) => {
return (
<>
<Fragment key={community.slug}>
<a href={`/communities/${community.slug}`}>
{community.metadata?.title}
</a>
{index !== communitiesEntries.length - 1 && ", "}
</>
</Fragment>
);
})}
</>
Expand Down

0 comments on commit ebc4c8d

Please sign in to comment.