tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Highlights.jsx (790B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 import { connect } from "react-redux";
      6 import React from "react";
      7 import { SectionIntl } from "content-src/components/Sections/Sections";
      8 
      9 export class _Highlights extends React.PureComponent {
     10  render() {
     11    const section = this.props.Sections.find(s => s.id === "highlights");
     12    if (!section || !section.enabled) {
     13      return null;
     14    }
     15 
     16    return (
     17      <div className="ds-highlights sections-list">
     18        <SectionIntl {...section} isFixed={true} />
     19      </div>
     20    );
     21  }
     22 }
     23 
     24 export const Highlights = connect(state => ({ Sections: state.Sections }))(
     25  _Highlights
     26 );