Timezone
diff --git a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
index c8c96c95d..fa0594316 100644
--- a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
+++ b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js
@@ -9,7 +9,7 @@ import { issues_types } from 'Types/session/issue'
import { fetchList as fetchSessionList } from 'Duck/sessions';
function SessionsMenu(props) {
- const { activeTab, keyMap, wdTypeCount, toggleRehydratePanel, isEnterprise } = props;
+ const { activeTab, keyMap, wdTypeCount, toggleRehydratePanel } = props;
const onMenuItemClick = (filter) => {
props.onMenuItemClick(filter)
@@ -66,11 +66,10 @@ function SessionsMenu(props) {
onMenuItemClick({ name: isEnterprise ? 'Vault' : 'Bookmarks', type: 'bookmark', description: isEnterprise ? 'Sessions saved to vault never get\'s deleted from records.' : '' })}
- // TODO show the description in header
+ onClick={() => onMenuItemClick({ name: 'Bookmarks', type: 'bookmark' })}
/>
@@ -87,7 +86,6 @@ export default connect(state => ({
captureRate: state.getIn(['watchdogs', 'captureRate']),
filters: state.getIn([ 'filters', 'appliedFilter' ]),
sessionsLoading: state.getIn([ 'sessions', 'fetchLiveListRequest', 'loading' ]),
- isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
}), {
fetchWatchdogStatus, clearEvents, fetchSessionList
})(SessionsMenu);
diff --git a/frontend/app/components/Session_/PlayerBlockHeader.js b/frontend/app/components/Session_/PlayerBlockHeader.js
index 4717c6329..58a524022 100644
--- a/frontend/app/components/Session_/PlayerBlockHeader.js
+++ b/frontend/app/components/Session_/PlayerBlockHeader.js
@@ -12,7 +12,6 @@ import SharePopup from '../shared/SharePopup/SharePopup';
import { fetchList as fetchListIntegration } from 'Duck/integrations/actions';
import { countries } from 'App/constants';
import SessionMetaList from 'Shared/SessionItem/SessionMetaList';
-import Bookmark from 'Shared/Bookmark'
import stl from './playerBlockHeader.css';
import Issues from './Issues/Issues';
@@ -163,8 +162,7 @@ export default class PlayerBlockHeader extends React.PureComponent {
<>
-
- {/*
*/}
+ />
Promise,
+ toggleFavorite: (session) => void,
favorite: Boolean,
- sessionId: any,
- isEnterprise: Boolean
+ sessionId: any
}
-function Bookmark(props : Props ) {
- const { sessionId, favorite, isEnterprise } = props;
- const [isFavorite, setIsFavorite] = useState(favorite);
- const ADDED_MESSAGE = isEnterprise ? 'Session added to vault' : 'Session added to your favorites';
- const REMOVED_MESSAGE = isEnterprise ? 'Session removed from vault' : 'Session removed from your favorites';
- const TOOLTIP_TEXT_ADD = isEnterprise ? 'Add to vault' : 'Add to favorites';
- const TOOLTIP_TEXT_REMOVE = isEnterprise ? 'Remove from vault' : 'Remove from favorites';
+function Bookmark({ toggleFavorite, sessionId, favorite } : Props ) {
- const ACTIVE_ICON = isEnterprise ? 'safe-fill' : 'star-solid';
- const INACTIVE_ICON = isEnterprise ? 'safe' : 'star';
-
-
- useEffect(() => {
- setIsFavorite(favorite);
- }, [favorite]);
-
- const toggleFavorite = async () => {
- props.toggleFavorite(sessionId).then(() => {
- toast.success(isFavorite ? REMOVED_MESSAGE : ADDED_MESSAGE);
- setIsFavorite(!isFavorite);
- });
- }
-
- return (
- toggleFavorite(sessionId) }
+ data-favourite={ favorite }
>
-
-
-
-
+
+
)
}
-export default connect(state => ({
- isEnterprise: state.getIn([ 'user', 'client', 'edition' ]) === 'ee',
-}), { toggleFavorite })(Bookmark)
+export default connect(null, { toggleFavorite })(Bookmark)
diff --git a/frontend/app/svg/icons/safe-fill.svg b/frontend/app/svg/icons/safe-fill.svg
deleted file mode 100644
index 76ed5854e..000000000
--- a/frontend/app/svg/icons/safe-fill.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/frontend/app/svg/icons/safe.svg b/frontend/app/svg/icons/safe.svg
deleted file mode 100644
index f06ce9c78..000000000
--- a/frontend/app/svg/icons/safe.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-