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

Commit

Permalink
Fjerner unødig key i listelement som ikke aksepteres som prop
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeofnorway committed Aug 1, 2023
1 parent eaf45bf commit f797855
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 f797855

Please sign in to comment.