{
- onClickFavorites = () => {
- this.props.setMostVisitedSettings(true, true)
- }
-
- onClickFrecency = () => {
- this.props.setMostVisitedSettings(true, false)
- }
-
- render () {
- const {
- toggleShowTopSites,
- showTopSites,
- customLinksEnabled
- } = this.props
-
- const favoritesSelected = showTopSites && customLinksEnabled
- const frecencySelected = showTopSites && !customLinksEnabled
- return (
-
-
- {getLocale('showTopSites')}
-
-
-
-
-
-
-
-
- {getLocale('showFavoritesLabel')}
-
-
- {getLocale('showFavoritesDesc')}
-
-
-
-
-
-
-
- {getLocale('showFrecencyLabel')}
-
-
- {getLocale('showFrecencyDesc')}
-
-
-
-
- )
- }
+function TopSitesSettings({ toggleShowTopSites, showTopSites, customLinksEnabled, setMostVisitedSettings }: Props) {
+ const favoritesSelected = showTopSites && customLinksEnabled
+ const frecencySelected = showTopSites && !customLinksEnabled
+ return
+
+ {getLocale('showTopSites')}
+
+
+
+ setMostVisitedSettings(true, true)}>
+
+
+ {getLocale('showFavoritesLabel')}
+
+
+ {getLocale('showFavoritesDesc')}
+
+
+ setMostVisitedSettings(true, false)}>
+
+
+ {getLocale('showFrecencyLabel')}
+
+
+ {getLocale('showFrecencyDesc')}
+
+
+
+
}
-export default TopSitesSettings
+export default React.memo(TopSitesSettings)