From 0af46a0d46e5000d1d4ddffa2b2dc91aec5b1e12 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Sun, 26 Nov 2017 22:03:23 -0800 Subject: [PATCH] Added feedback link --- app/menus/AccountMenu.js | 8 ++++++++ server/pages/Home.js | 2 +- server/pages/components/Navigation.js | 2 +- server/pages/components/SignupButton.js | 2 +- server/utils/routeHelpers.js | 25 ------------------------- shared/utils/routeHelpers.js | 24 ++++++++++++++++++++++++ 6 files changed, 35 insertions(+), 28 deletions(-) delete mode 100644 server/utils/routeHelpers.js diff --git a/app/menus/AccountMenu.js b/app/menus/AccountMenu.js index 4e3fb678..4396f5d7 100644 --- a/app/menus/AccountMenu.js +++ b/app/menus/AccountMenu.js @@ -5,6 +5,7 @@ import { inject, observer } from 'mobx-react'; import UiStore from 'stores/UiStore'; import AuthStore from 'stores/AuthStore'; import { DropdownMenu, DropdownMenuItem } from 'components/DropdownMenu'; +import { spectrumUrl } from '../../shared/utils/routeHelpers'; @observer class AccountMenu extends Component { @@ -32,6 +33,10 @@ class AccountMenu extends Component { window.location.href = BASE_URL; }; + handleFeedback = () => { + window.location.href = spectrumUrl(); + }; + render() { return ( API documentation + + Feedback + Logout ); diff --git a/server/pages/Home.js b/server/pages/Home.js index 13dbd710..d92b087c 100644 --- a/server/pages/Home.js +++ b/server/pages/Home.js @@ -6,7 +6,7 @@ import Grid from 'styled-components-grid'; import breakpoint from 'styled-components-breakpoint'; import Hero from './components/Hero'; import SignupButton from './components/SignupButton'; -import { developers, githubUrl } from '../utils/routeHelpers'; +import { developers, githubUrl } from '../../shared/utils/routeHelpers'; import { color } from '../../shared/styles/constants'; function Home() { diff --git a/server/pages/components/Navigation.js b/server/pages/components/Navigation.js index 69e7f010..4525443f 100644 --- a/server/pages/components/Navigation.js +++ b/server/pages/components/Navigation.js @@ -9,7 +9,7 @@ import { spectrumUrl, blogUrl, twitterUrl, -} from '../../utils/routeHelpers'; +} from '../../../shared/utils/routeHelpers'; import { color } from '../../../shared/styles/constants'; function TopNavigation() { diff --git a/server/pages/components/SignupButton.js b/server/pages/components/SignupButton.js index f3d31b55..fe5595b7 100644 --- a/server/pages/components/SignupButton.js +++ b/server/pages/components/SignupButton.js @@ -1,7 +1,7 @@ // @flow import React from 'react'; import styled from 'styled-components'; -import { signin } from '../../utils/routeHelpers'; +import { signin } from '../../../shared/utils/routeHelpers'; import SlackLogo from '../../../shared/components/SlackLogo'; import { color } from '../../../shared/styles/constants'; diff --git a/server/utils/routeHelpers.js b/server/utils/routeHelpers.js deleted file mode 100644 index df39c6ab..00000000 --- a/server/utils/routeHelpers.js +++ /dev/null @@ -1,25 +0,0 @@ -// @flow - -export function githubUrl(): string { - return 'https://www.github.com/outline'; -} - -export function blogUrl(): string { - return 'https://medium.com/getoutline'; -} - -export function twitterUrl(): string { - return 'https://twitter.com/getoutline'; -} - -export function spectrumUrl(): string { - return 'https://spectrum.chat/outline'; -} - -export function developers(): string { - return '/developers'; -} - -export function signin(): string { - return '/auth/slack'; -} diff --git a/shared/utils/routeHelpers.js b/shared/utils/routeHelpers.js index d5ecf65c..bb0ef5bf 100644 --- a/shared/utils/routeHelpers.js +++ b/shared/utils/routeHelpers.js @@ -24,3 +24,27 @@ export function slackAuth( return `${baseUrl}?${urlParams}`; } + +export function githubUrl(): string { + return 'https://www.github.com/outline'; +} + +export function blogUrl(): string { + return 'https://medium.com/getoutline'; +} + +export function twitterUrl(): string { + return 'https://twitter.com/getoutline'; +} + +export function spectrumUrl(): string { + return 'https://spectrum.chat/outline'; +} + +export function developers(): string { + return '/developers'; +} + +export function signin(): string { + return '/auth/slack'; +}