Last active
March 10, 2023 08:08
-
-
Save MariusBongarts/cf672d06385ce6fd9ed240b8dc1ca099 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { HistoryItem } from "./HistoryItem"; | |
import { StyledList } from "./History.styled"; | |
const MemoizedHistoryItem = React.memo(HistoryItem); | |
interface HistoryProps { | |
items: chrome.history.HistoryItem[]; | |
} | |
export const History: React.FC<HistoryProps> = ({ items }) => { | |
return ( | |
<StyledList> | |
{items.map((item) => ( | |
<MemoizedHistoryItem key={item.id} item={item} /> | |
))} | |
</StyledList> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment