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
{"lastUpload":"2020-05-18T12:09:30.631Z","extensionVersion":"v3.4.3"} |
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
/** | |
* this hook is used to check if the app needs to be refreshed | |
* it stores the last time the page has been refreshed in local storage | |
* if it's been more than {@param minutes}, it returns true | |
* it is executed on window focus. | |
* this is particularly useful for those apps that don't use a remote versioning control | |
* and where users keep the app open for long periods | |
*/ | |
import { useCallback, useEffect, useState } from "react"; |