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

Update app.js #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React, { useEffect } from 'react';
import twitterLogo from './assets/twitter-logo.svg';
import './App.css';

Expand All @@ -6,6 +7,32 @@ const TWITTER_HANDLE = '_buildspace';
const TWITTER_LINK = `https://twitter.com/${TWITTER_HANDLE}`;

const App = () => {



const checkIfWalletIsConnected = async () => {
try {
const ( solana } = window;

if (solana.isPhantom) {
console.log('Phantom Wallet found!');
}
} else {
alert('Solana object not found! Get a Phantom Wallet 👻');
}
};





useEffect (() => {
const onLoad = async () => {
await checkIfWalletIsConnected();
};
window.addEventListener('Load, onLoad);
}, []);

return (
<div className="App">
<div className="container">
Expand Down