Skip to content

Instantly share code, notes, and snippets.

View ac12644's full-sized avatar
⛓️
one block at a time

Abhishek Chauhan ac12644

⛓️
one block at a time
View GitHub Profile
import React, { useState, useEffect } from "react";
const Receipts = (props) => {
const [ donation, setDonation ] = useState(null);
const [ fundName, setFundName ] = useState(null);
const [ date, setDate ] = useState(null);
useEffect(() => {
const { donation, date, fund } = props.location.state;
const formattedDate = new Date(parseInt(date * 1000));