diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-03-02 16:24:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 16:24:37 +0100 |
commit | 299cebedac5ef4a6a17dd18782c2b1a2a79f08d5 (patch) | |
tree | 357d7b0ebe5fe686b9f2ea35507a2fb58bce12a0 /server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.js | |
parent | 2d98999918574c56056c21f9c4791476d644a041 (diff) | |
download | sonarqube-299cebedac5ef4a6a17dd18782c2b1a2a79f08d5.tar.gz sonarqube-299cebedac5ef4a6a17dd18782c2b1a2a79f08d5.zip |
rewrite remaining popups in react (#3109)
* extract baseFontFamily
* rewrite favorites store in ts
* add new types and change existing ones
* rewrite SourceViewer helpers in ts
* rewrite SourceViewer in ts and its popups in react
* drop popups
* fix iterating over nodelist
* fix quality flaws
Diffstat (limited to 'server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.js')
-rw-r--r-- | server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.js | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.js b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.js deleted file mode 100644 index 974eb8e4b0f..00000000000 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2018 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -// @flow -import { connect } from 'react-redux'; -import SourceViewerBase from './SourceViewerBase'; -import { receiveFavorites } from '../../store/favorites/duck'; - -const mapStateToProps = null; - -const onReceiveComponent = ( - component /*: { - key: string, - canMarkAsFavorite: boolean, - fav: boolean -} */ -) => dispatch => { - if (component.canMarkAsFavorite) { - const favorites = []; - const notFavorites = []; - if (component.fav) { - favorites.push({ key: component.key }); - } else { - notFavorites.push({ key: component.key }); - } - dispatch(receiveFavorites(favorites, notFavorites)); - } -}; - -const mapDispatchToProps = { onReceiveComponent }; - -export default connect(mapStateToProps, mapDispatchToProps)(SourceViewerBase); |