Skip to content

Commit

Permalink
Merge pull request #1256 from ethereum-push-notification-service/conf…
Browse files Browse the repository at this point in the history
…igure-snap-addresses

Configure Snap Addresses UI
  • Loading branch information
Arch0125 authored Sep 19, 2023
2 parents 1a917a3 + 3f22c32 commit ff86a1c
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 100 deletions.
11 changes: 7 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function App() {
const {authError, setAuthError } = useContext(ErrorContext);

const { run, stepIndex, tutorialContinous } = useSelector((state: any) => state.userJourney);
const location = useLocation();
// const location = useLocation();
// Build takes care of this now
// const [title, setTitle] = useState(EnvHelper.dappTitle());

Expand Down Expand Up @@ -225,6 +225,9 @@ export default function App() {

// const { spaceUI } = useSpaceComponents();

const location = useLocation();
const isSnapPage = location?.pathname === '/snap';

return (
<ThemeProvider theme={darkMode ? themeDark : themeLight}>
{!isActive && (
Expand Down Expand Up @@ -280,11 +283,11 @@ export default function App() {
bg={darkMode ? themeDark.backgroundBG : !isActive ? themeLight.connectWalletBg : themeLight.backgroundBG}
headerHeight={GLOBALS.CONSTANTS.HEADER_HEIGHT}
>
<LeftBarContainer leftBarWidth={GLOBALS.CONSTANTS.LEFT_BAR_WIDTH}>
{!isSnapPage && <LeftBarContainer leftBarWidth={GLOBALS.CONSTANTS.LEFT_BAR_WIDTH}>
<Navigation />
</LeftBarContainer>
</LeftBarContainer>}

<ContentContainer leftBarWidth={GLOBALS.CONSTANTS.LEFT_BAR_WIDTH}>
<ContentContainer leftBarWidth={isSnapPage ? 0 : GLOBALS.CONSTANTS.LEFT_BAR_WIDTH}>
{/* Shared among all pages, load universal things here */}
<SpacesUIProvider spaceUI={spaceUI} theme={darkMode ? darkTheme : lightTheme}>
<MasterInterfacePage />
Expand Down
13 changes: 9 additions & 4 deletions src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import { Button } from 'components/SharedStyling';
import { ItemHV2, ItemVV2, SpanV2 } from 'components/reusables/SharedStylingV2';
// React + Web3 Essentials
import React, { useEffect } from 'react';

// External Packages
import styled,{useTheme} from 'styled-components';

// Internal Compoonents
import { A } from 'primaries/SharedStyling';
import { ItemHV2, ItemVV2, SpanV2 } from 'components/reusables/SharedStylingV2';
import { Button } from 'components/SharedStyling';
import Metamask from 'assets/PushSnaps/metamasksnap.svg';
import PushIcon from 'assets/PushSnaps/PushIcon.svg';
import AppStoreQRCode from 'assets/PushSnaps/AppStoreQRCode.svg';
import PlayStoreQRCode from 'assets/PushSnaps/PlayStoreQRCode.svg';
import AppleIcon from 'assets/PushSnaps/AppleIcon.svg';
import PlayStore from 'assets/PushSnaps/PlayStore.svg';
import { A } from 'primaries/SharedStyling';


const InstallMetamaskSnapModal = ({
Expand All @@ -28,7 +33,7 @@ const InstallMetamaskSnapModal = ({
method: 'wallet_getSnaps'
});
Object.keys(installedSnaps).forEach((snap) => {
if (snap == 'npm:push-v1') {
if (snap == 'npm:@pushprotocol/snaps') {
setConfigure(true);
}
}
Expand Down
Loading

0 comments on commit ff86a1c

Please sign in to comment.