Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1472 from navikt/fikse-list-element-key-varsel
Browse files Browse the repository at this point in the history
Fjerner unødig key i listelement
  • Loading branch information
terjeofnorway authored Aug 1, 2023
2 parents eaf45bf + f797855 commit ce4c8db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/komponenter/footer/common/Lenker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const getLang = (url: string) => {

type ListElementProps = {
wrap: boolean;
key?: React.Key;
children: JSX.Element;
};
type ListWrapperProps = {
Expand All @@ -39,9 +38,9 @@ const ListWrapper = ({ className, wrap, elements }: ListWrapperProps): JSX.Eleme
return <>{elements}</>;
};

const ListElement = ({ wrap, key, children }: ListElementProps) => {
const ListElement = ({ wrap, children }: ListElementProps) => {
if (wrap) {
return <li key={key}>{children}</li>;
return <li>{children}</li>;
}
return children;
};
Expand Down

0 comments on commit ce4c8db

Please sign in to comment.