This file contains hidden or 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
| #!/usr/bin/env node | |
| // Based on: | |
| // https://gist.github.com/ohh2ahh/f35ff6e0d9f8b4268cdb | |
| // Save hook in your cordova root in eg `<project-root>/scripts/` | |
| // Add the hook to your cordova config.xml eg | |
| // <hook type="before_prepare" src="scripts/increment_build_numbers.js"/> | |
| // | |
| // Don't forget to install xml2js and build-number-generator using npm or yarn |
This file contains hidden or 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 PropTypes from 'prop-types' | |
| import { DateTime } from 'luxon' | |
| const RelativeTime = (props) => { | |
| const dt = DateTime.fromJSDate(props.time) | |
| const [relTime, setRelTime] = useState(dt.toRelative()) | |
| const [intervalID, setIntervalID] = useState() | |
| useEffect(() => { |