Skip to content

Instantly share code, notes, and snippets.

View ac12644's full-sized avatar
πŸ‘¨β€πŸ’»
Working from home

Abhishek Chauhan ac12644

πŸ‘¨β€πŸ’»
Working from home
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));