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
<Router> | |
<div> | |
<nav> | |
<ul> | |
<li> | |
<NavLink to="/">Home</NavLink> | |
</li> | |
<li> | |
<NavLink to="/new/">New</NavLink> | |
</li> |
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
import React, { useState, useEffect } from "react"; | |
import FundraiserCard from './FundraiserCard'; | |
const Home = () => { | |
useEffect(() => {}, []); | |
const displayFundraisers = () => { | |
return funds.map( (fundraiser) => { | |
return ( | |
<FundraiserCard fundraiser={fundraiser} key={fundraiser}/> | |
); |
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
import React, { useState, useEffect } from "react"; | |
const NewFundraiser = () => { | |
useEffect(() => {}, []); | |
return ( | |
<div><h2>Create a New Fundraiser</h2></div> | |
) } | |
export default NewFundraiser; |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { BrowserRouter } from 'react-router-dom' | |
import App from './App'; | |
ReactDOM.render(( | |
<BrowserRouter> | |
<App /> | |
</BrowserRouter> | |
), document.getElementById('root')) |
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
<Router> | |
<div> | |
<AppBar position="static" color="default"> | |
<Toolbar> | |
<Typography variant="h6" color="inherit"> | |
<NavLink className="nav-link" to="/">Home</NavLink> | |
</Typography> | |
<NavLink className="nav-link" to="/new/">New Fundraiser</NavLink> | |
</Toolbar> | |
</AppBar> |
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
body { | |
margin: 0 !important; | |
} | |
.nav-link { | |
color: inherit; | |
text-decoration: none; | |
margin-right: 15px; | |
} | |
.nav-link:hover, | |
.nav-link:active, |
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
import React, { useState, useEffect } from "react"; | |
import { makeStyles } from '@material-ui/core/styles'; | |
import TextField from '@material-ui/core/TextField'; | |
import Button from '@material-ui/core/Button'; | |
import detectEthereumProvider from '@metamask/detect-provider'; | |
import getWeb3 from './utils/getWeb3'; | |
import FactoryContract from './contracts/Factory.json'; | |
import Web3 from 'web3' | |
const useStyles = makeStyles (theme => ({ |
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
import React, { useEffect } from 'react'; | |
import { makeStyles } from '@material-ui/core/styles'; | |
import Card from '@material-ui/core/Card'; | |
import CardActionArea from '@material-ui/core/CardActionArea'; | |
import CardActions from '@material-ui/core/CardActions'; | |
import CardContent from '@material-ui/core/CardContent'; | |
import CardMedia from '@material-ui/core/CardMedia'; | |
import Button from '@material-ui/core/Button'; | |
import Typography from '@material-ui/core/Typography'; | |
import FundraiserContract from "./contracts/Fundraiser.json"; |
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
import React, { useState, useEffect } from "react"; | |
import { makeStyles } from '@material-ui/core/styles'; | |
import Card from '@material-ui/core/Card'; | |
import CardActionArea from '@material-ui/core/CardActionArea'; | |
import CardActions from '@material-ui/core/CardActions'; | |
import CardContent from '@material-ui/core/CardContent'; | |
import CardMedia from '@material-ui/core/CardMedia'; | |
import Typography from '@material-ui/core/Typography'; | |
import Web3 from 'web3'; | |
import FundraiserContract from './contracts/Fundraiser.json'; |
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
import React, { useState, useEffect } from "react"; | |
import { BrowserRouter as Router, Route, NavLink } from "react-router-dom" | |
import NewFundraiser from './NewFundraiser' | |
import Home from './Home' | |
import FactoryContract from "./contracts/Factory.json"; | |
import getWeb3 from "./utils/getWeb3"; | |
import "./App.css"; | |
import { makeStyles } from '@material-ui/core/styles'; | |
import AppBar from '@material-ui/core/AppBar'; | |
import Toolbar from '@material-ui/core/Toolbar'; |