Skip to content

Commit

Permalink
Third2 Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratnesh4193 committed Oct 29, 2023
1 parent 5a044b8 commit dd2223a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
30 changes: 12 additions & 18 deletions src/Screens/HomeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import { Link } from "react-router-dom";
import Button from "react-bootstrap/Button";
import { Col, Container, Nav, Navbar, Row } from "react-bootstrap";
import Project from "../components/Project";
import { FaPlus } from "react-icons/fa6";
import Loader from "../components/Loader";
import { LinkContainer } from "react-router-bootstrap";
import web3 from "../ethereum/web3";
const HomeScreen = () => {
const [projectList, setProjectList] = useState([]);
const [isLoading, setIsLoading] = useState(0);
Expand All @@ -18,7 +16,6 @@ const HomeScreen = () => {
const newProjectList = await factory.methods
.getDeployedProjects()
.call();
console.log(newProjectList);
setProjectList(newProjectList);
} catch (err) {
console.log(err.message);
Expand All @@ -39,22 +36,19 @@ const HomeScreen = () => {
];
return (
<>
<Navbar expand="lg" collapseOnSelect>
<Navbar expand="lg">
<Container className="shadow-sm p-2 mb-2 bg-white rounded display-7 d-flex justify-content-center align-items-center">
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
{categories.map((category) => {
return (
<Container>
<Nav className="ml-auto justify-content-center on-hover">
<LinkContainer to="/">
<Nav.Link>{category}</Nav.Link>
</LinkContainer>
</Nav>
</Container>
);
})}
</Navbar.Collapse>
{categories.map((category, id) => {
return (
<Container key={id}>
<Nav className="ml-auto justify-content-center on-hover">
<LinkContainer to="/">
<Nav.Link>{category}</Nav.Link>
</LinkContainer>
</Nav>
</Container>
);
})}
</Container>
</Navbar>
<div>
Expand Down
1 change: 0 additions & 1 deletion src/Screens/ProjectScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ const ProjectScreen = () => {
</Row>
<Row>
{Object.keys(projectHeader).map((key, id) => {
console.log(key, projectHeader[key], currentProject[key]);
return (
// <p> {key}</p>
<Col key={id} sm={12} md={12} lg={6} xl={6}>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ const Project = ({ project }) => {
<Card.Title as="h4">
<strong className="text-capitalize">{project.title}</strong>
</Card.Title>
<Card.Text as="h7">
<Card.Text as="h6">
<div className="my-1">
<strong className="h6">Category: </strong>
{project.category}
</div>
</Card.Text>
<Card.Text as="h7">
<Card.Text as="h6">
<div className="my-1">
<strong className="h6">Min. Contribution: </strong>
{project.minimumContribution} wei
</div>
</Card.Text>
<Card.Text as="h7">
<Card.Text as="h6">
<div className="my-1">
<strong className="h6">Target Amount: </strong>
{project.targetAmount} wei
</div>
</Card.Text>
<Card.Text as="h7">
<Card.Text as="h6">
<div className="my-1">
<strong className="h6">Manager: </strong>
{project.manager}
</div>
</Card.Text>
<Card.Text as="h7">
<Card.Text as="h6">
<div className="my-1">
{" "}
<strong className="h6">Project Address:</strong>
Expand Down
3 changes: 1 addition & 2 deletions src/ethereum/factory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import web3 from "./web3";
import ProjectFactory from "./build/ProjectFactory.json";

console.log(process.env.REACT_APP_DEPLOYED_FACTORY_ADDRESS);
console.log("FACTORY.JS Window.web3", window.web3);
const instance = new web3.eth.Contract(
ProjectFactory.abi,
process.env.REACT_APP_DEPLOYED_FACTORY_ADDRESS
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/web3.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Web3 from "web3";
let web3;
console.log(Window.web3);
console.log("WEB3.JS window.web3", window.web3);
if (window.web3 !== undefined) {
web3 = new Web3(window.web3.currentProvider);
} else {
Expand Down

0 comments on commit dd2223a

Please sign in to comment.