diff --git a/lib/app.tsx b/lib/app.tsx index e558f74a9..2538066a1 100644 --- a/lib/app.tsx +++ b/lib/app.tsx @@ -4,7 +4,6 @@ import 'focus-visible/dist/focus-visible.js'; import NoteInfo from './note-info'; import NavigationBar from './navigation-bar'; import AppLayout from './app-layout'; -import BetaBar from './components/beta-bar'; import DevBadge from './components/dev-badge'; import DialogRenderer from './dialog-renderer'; import { isElectron, isMac } from './utils/platform'; @@ -162,7 +161,6 @@ class AppComponent extends Component {
{showNavigation && } - {showNoteInfo && }
diff --git a/lib/components/beta-bar/index.tsx b/lib/components/beta-bar/index.tsx deleted file mode 100644 index 31ddc7f42..000000000 --- a/lib/components/beta-bar/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React, { useState } from 'react'; -import SmallCrossIcon from '../../icons/cross-small'; -import { isElectron } from '../../utils/platform'; - -const loadOptOut = (): boolean => { - try { - const stored = localStorage.getItem('betaBannerDismissedAt'); - const dismissedAt = stored ? parseInt(stored, 10) : -Infinity; - - return ( - isNaN(dismissedAt) || Date.now() - dismissedAt > 7 * 24 * 60 * 60 * 1000 - ); - } catch (e) { - return true; - } -}; - -const storeOptOut = () => { - try { - localStorage.setItem('betaBannerDismissedAt', Date.now().toString()); - } catch (e) { - // pass - } -}; - -const BetaBar = () => { - const [isVisible, setIsVisible] = useState(loadOptOut()); - const dismissBanner = () => { - storeOptOut(); - setIsVisible(false); - }; - - return !isElectron && isVisible ? ( -
- You‘re invited to try Simplenote Beta. - Try it now. - - - -
- ) : null; -}; - -export default BetaBar; diff --git a/lib/components/beta-bar/style.scss b/lib/components/beta-bar/style.scss deleted file mode 100644 index 301509b69..000000000 --- a/lib/components/beta-bar/style.scss +++ /dev/null @@ -1,23 +0,0 @@ -.beta-bar { - position: absolute; - width: 100%; - height: 36px; - bottom: 0; - box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.2); - background-color: #3d3f41; - color: #fff; - text-align: center; - line-height: 32px; - z-index: 1; - - a { - color: #fff !important; - margin-left: 5px; - } - svg { - position: absolute; - right: 12px; - bottom: 7px; - cursor: pointer; - } -} diff --git a/scss/_components.scss b/scss/_components.scss index 2d118d095..c416593a5 100644 --- a/scss/_components.scss +++ b/scss/_components.scss @@ -1,6 +1,5 @@ @import 'app-layout/style'; @import 'auth/style'; -@import 'components/beta-bar/style'; @import 'components/dev-badge/style'; @import 'components/panel-title/style'; @import 'components/progress-bar/style';