Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const startApp = async () => {
await persistCache({
cache,
storage: window.localStorage,
});
const apolloClient = new ApolloClient({
cache,
link,
});
const notificationOptions = {
position: positions.BOTTOM_RIGHT,
timeout: 2500,
};
const Root = hot(module)(() => {
const Notifications = () => {
const alert = useAlert();
const { updateAvailable } = React.useContext(ServiceWorkerContext);
React.useEffect(() => {
if (updateAvailable) {
alert.show(
{
actionText: "Refresh",
content:
"To update the application to the latest version, please refresh the page!",