Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Snap Addresses UI #1256

Merged
merged 6 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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