-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨ðŸ¤Â ↣ Failure to implement system-wide context from Vite package migra…
…tion Signal-K/Silfur#25
- Loading branch information
1 parent
e5656dd
commit ed98d2e
Showing
33 changed files
with
575 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*export { default as Home } from './Home'; | ||
export { default as Profile } from './Profile'; | ||
export { default as CreateProposal } from './CreateProposal'; | ||
export { default as ProposalDetails } from './ProposalDetails';*/ | ||
|
||
import React, { useState, useEffect } from "react"; | ||
import { useStateContext } from './context'; | ||
//import { DisplayProposals } from './components'; | ||
|
||
const Home = () => { | ||
const [isLoading, setIsLoading] = useState(false); | ||
const [proposals, setProposals] = useState([]); // Empty array, retrieved from the state context from onchain | ||
|
||
const { address, contract, getProposals } = useStateContext(); /* | ||
const fetchProposals = async () => { // This is to allow us to call this g.request in the useEffect (as the request is async in /context) | ||
setIsLoading(true); | ||
const data = await getProposals(); | ||
setProposals(data); | ||
setIsLoading(false); | ||
} | ||
useEffect(() => { | ||
if (contract) fetchProposals(); | ||
console.log(proposals); | ||
}, [address, contract]); // Re-called when these change*/ | ||
|
||
return ( | ||
<div>Hello World</div> | ||
) | ||
} | ||
|
||
export default Home; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import createCampaign from './create-campaign.svg'; | ||
import dashboard from './dashboard.svg'; | ||
import logo from './logo.svg'; | ||
import logout from './logout.svg'; | ||
import payment from './payment.svg'; | ||
import profile from './profile.svg'; | ||
import sun from './sun.svg'; | ||
import withdraw from './withdraw.svg'; | ||
import tagType from './type.svg'; | ||
import search from './search.svg'; | ||
import menu from './menu.svg'; | ||
import money from './money.svg'; | ||
import loader from './loader.svg'; | ||
import thirdweb from './thirdweb.png'; | ||
|
||
export { | ||
tagType, | ||
createCampaign, | ||
dashboard, | ||
logo, | ||
logout, | ||
payment, | ||
profile, | ||
sun, | ||
withdraw, | ||
search, | ||
menu, | ||
money, | ||
loader, | ||
thirdweb, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.