Skip to content

Commit

Permalink
feat: freeze sentry user feedback (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinaYahya authored Oct 23, 2023
1 parent cda2071 commit 1a53ffa
Showing 1 changed file with 25 additions and 27 deletions.
52 changes: 25 additions & 27 deletions src/components/main/MainMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useLocation, useNavigate } from 'react-router';

import { BugReport } from '@mui/icons-material';
// import { BugReport } from '@mui/icons-material';
import AutoStoriesIcon from '@mui/icons-material/AutoStories';
import DeleteIcon from '@mui/icons-material/Delete';
import FolderIcon from '@mui/icons-material/Folder';
Expand All @@ -16,13 +16,10 @@ import {
} from '@mui/material';
import ListItemIcon from '@mui/material/ListItemIcon';

import { DEFAULT_LANG } from '@graasp/sdk';
import { MainMenu as GraaspMainMenu, LibraryIcon, MenuItem } from '@graasp/ui';

import { captureMessage, showReportDialog } from '@sentry/react';

import { TUTORIALS_LINK } from '../../config/constants';
import i18n, { useBuilderTranslation } from '../../config/i18n';
import { useBuilderTranslation } from '../../config/i18n';
import {
FAVORITE_ITEMS_PATH,
HOME_PATH,
Expand Down Expand Up @@ -52,28 +49,29 @@ const MainMenu = (): JSX.Element => {
navigate(path);
};

const openBugReport = () => {
const eventId = captureMessage(
`Graasp Builder | User Feedback ${Date.now()}`,
);
// this will be reported in sentry user feedback issues
showReportDialog({
eventId,
title: translateBuilder(BUILDER.REPORT_A_BUG),
lang: i18n.language || DEFAULT_LANG,
});
};
// sentry feedback feature
// const openBugReport = () => {
// const eventId = captureMessage(
// `Graasp Builder | User Feedback ${Date.now()}`,
// );
// // this will be reported in sentry user feedback issues
// showReportDialog({
// eventId,
// title: translateBuilder(BUILDER.REPORT_A_BUG),
// lang: i18n.language || DEFAULT_LANG,
// });
// };

const reportBugLink = (
<ListItem disablePadding>
<ListItemButton onClick={openBugReport}>
<ListItemIcon>
<BugReport />
</ListItemIcon>
<ListItemText>{translateBuilder(BUILDER.REPORT_A_BUG)}</ListItemText>
</ListItemButton>
</ListItem>
);
// const reportBugLink = (
// <ListItem disablePadding>
// <ListItemButton onClick={openBugReport}>
// <ListItemIcon>
// <BugReport />
// </ListItemIcon>
// <ListItemText>{translateBuilder(BUILDER.REPORT_A_BUG)}</ListItemText>
// </ListItemButton>
// </ListItem>
// );

const resourceLinks = (
<ListItem disablePadding>
Expand Down Expand Up @@ -144,7 +142,7 @@ const MainMenu = (): JSX.Element => {
<Stack direction="column" height="100%" justifyContent="space-between">
{renderAuthenticatedMemberMenuItems()}
<div>
{reportBugLink}
{/* {reportBugLink} */}
{resourceLinks}
</div>
</Stack>
Expand Down

0 comments on commit 1a53ffa

Please sign in to comment.