Skip to content

Commit

Permalink
added updated menu for settings
Browse files Browse the repository at this point in the history
  • Loading branch information
NidhiKJha committed Sep 14, 2023
1 parent e439cc8 commit 57093dd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React, { useRef, useState } from 'react';
import PropTypes from 'prop-types';
import { useHistory } from 'react-router-dom';
import { AvatarFavicon, ButtonIcon, IconName } from '../../component-library';
import { stripHttpsSchemeWithoutPort } from '../../../helpers/utils/util';
import SiteOrigin from '../../ui/site-origin';
import { BorderColor, Size } from '../../../helpers/constants/design-system';
import { useI18nContext } from '../../../hooks/useI18nContext';
import { Menu, MenuItem } from '../../ui/menu';
import { SNAPS_LIST_ROUTE } from '../../../helpers/constants/routes';

export default function ConnectedSitesList({
connectedSubjects,
Expand All @@ -14,6 +16,7 @@ export default function ConnectedSitesList({
const [showOptions, setShowOptions] = useState(false);
const ref = useRef(false);
const t = useI18nContext();
const history = useHistory();

const getSubjectDisplayName = (subject) => {
if (subject.extensionId) {
Expand Down Expand Up @@ -65,6 +68,12 @@ export default function ConnectedSitesList({
>
{t('disconnect')}
</MenuItem>
<MenuItem
iconName={IconName.Setting}
onClick={() => history.push(SNAPS_LIST_ROUTE)}
>
{t('snapsSettings')}
</MenuItem>
</Menu>
) : null}
</div>
Expand Down

0 comments on commit 57093dd

Please sign in to comment.