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 './styles/App.css'; | |
import twitterLogo from './assets/twitter-logo.svg'; | |
import { ethers } from "ethers"; | |
import React, { useEffect, useState } from "react"; | |
import myEpicNft from './utils/MyEpicNFT.json'; | |
const TWITTER_HANDLE = '_buildspace'; | |
const TWITTER_LINK = `https://twitter.com/${TWITTER_HANDLE}`; | |
const OPENSEA_LINK = ''; | |
const TOTAL_MINT_COUNT = 50; |
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
// MARK: - NSDate timeAgoSinceDate | |
// Updated for Swift2.0 | |
func timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String { | |
let calendar = NSCalendar.currentCalendar() | |
let now = NSDate() | |
let earliest = now.earlierDate(date) | |
let latest = (earliest == now) ? date : now | |
let components:NSDateComponents = calendar.components([.Hour, .Minute, .Day, .WeekOfYear, .Month, .Year, .Second], fromDate: earliest, toDate: latest, options: []) |