Skip to content

Commit 4416d08

Browse files
chakrihackerCompuIves
authored andcommitted
Added chat on discord option and removed Feedback button (codesandbox#276)
* Added chat on discord option and removed Feedback button * Removed sendfeedback action
1 parent bf81049 commit 4416d08

File tree

4 files changed

+14
-118
lines changed

4 files changed

+14
-118
lines changed

src/app/containers/Preferences/SideNavigation/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import styled, { css } from 'styled-components';
33

44
import TwitterIcon from 'react-icons/lib/fa/twitter';
55
import GithubIcon from 'react-icons/lib/fa/github';
6+
import FeedbackIcon from 'react-icons/lib/go/comment-discussion';
67

78
import Relative from 'app/components/Relative';
89

@@ -126,6 +127,13 @@ export default ({ menuItems, itemIndex, setItem }: Props) => (
126127
>
127128
<GithubIcon />
128129
</Icon>
130+
<Icon
131+
href="https://discord.gg/FGeubVt"
132+
target="_blank"
133+
rel="noopener noreferrer"
134+
>
135+
<FeedbackIcon />
136+
</Icon>
129137
</SocialIcons>
130138
</Container>
131139
);

src/app/pages/Sandbox/Editor/Content/Header/FeedbackView.js

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/app/pages/Sandbox/Editor/Content/Header/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import HeartIcon from 'react-icons/lib/fa/heart-o';
1414
import FullHeartIcon from 'react-icons/lib/fa/heart';
1515
import TwitterIcon from 'react-icons/lib/fa/twitter';
1616
import SearchIcon from 'react-icons/lib/go/search';
17+
import FeedbackIcon from 'react-icons/lib/go/comment-discussion';
1718
import SettingsIcon from 'react-icons/lib/md/settings';
1819
import ShareIcon from 'react-icons/lib/md/share';
1920
import { Tooltip } from 'react-tippy';
@@ -36,7 +37,6 @@ import NewSandbox from 'app/containers/modals/NewSandbox';
3637
import Deployment from 'app/containers/Deployment';
3738

3839
import Action from './Action';
39-
import FeedbackView from './FeedbackView';
4040
import ShareView from './ShareView';
4141

4242
const Container = styled.div`
@@ -299,9 +299,11 @@ export default class Header extends React.PureComponent<Props> {
299299
tooltip="Contact"
300300
Icon={TwitterIcon}
301301
/>
302-
<FeedbackView
303-
email={user.email}
304-
sendMessage={userActions.sendFeedback}
302+
<Action
303+
href="https://discord.gg/FGeubVt"
304+
a
305+
tooltip="Chat on Discord"
306+
Icon={FeedbackIcon}
305307
/>
306308
<Action
307309
onClick={this.openNewSandbox}

src/app/store/user/actions.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const LOAD_USER_SANDBOXES = createAPIActions(
3030
'CURRENT_USER',
3131
'FETCH_SANDBOXES'
3232
);
33-
export const SEND_FEEDBACK_API = createAPIActions('FEEDBACK', 'SEND');
3433
export const GET_AUTH_TOKEN_API = createAPIActions('AUTH_TOKEN', 'FETCH');
3534

3635
export const CREATE_SUBSCRIPTION_API = createAPIActions(
@@ -144,24 +143,6 @@ const loadUserSandboxes = () => async (dispatch: Function) => {
144143
});
145144
};
146145

147-
const sendFeedback = (message: string) => async (dispatch: Function) => {
148-
await dispatch(
149-
doRequest(SEND_FEEDBACK_API, 'feedbacks', {
150-
method: 'POST',
151-
body: {
152-
feedback: {
153-
feedback: message,
154-
url: window.location.href,
155-
},
156-
},
157-
})
158-
);
159-
160-
dispatch(
161-
notifActions.addNotification('Thanks a lot for your feedback!', 'success')
162-
);
163-
};
164-
165146
const createSubscription = (token: string, amount: number) => async (
166147
dispatch: Function
167148
) => {
@@ -338,7 +319,6 @@ export default {
338319
signIn,
339320
getCurrentUser,
340321
loadUserSandboxes,
341-
sendFeedback,
342322
setBadgeVisibility,
343323
fetchZeitUserDetails,
344324
signOutFromZeit,

0 commit comments

Comments
 (0)