diff --git a/packages/elements/src/hooks/use-offline-plugin/__tests__/use-offline-plugin.tsx b/packages/elements/src/hooks/use-offline-plugin/__tests__/use-offline-plugin.tsx
deleted file mode 100644
index 05e86e3baf..0000000000
--- a/packages/elements/src/hooks/use-offline-plugin/__tests__/use-offline-plugin.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { renderHook, act } from '@testing-library/react-hooks'
-import { useOfflinePLugin } from '../use-offline-plugin'
-import * as runtime from 'offline-plugin/runtime'
-
-jest.mock('offline-plugin/runtime')
-
-describe('useOfflinePLugin', () => {
- it('should call applyUpdate on event onUpdateReady of the service worker', () => {
- renderHook(() => useOfflinePLugin())
- const mockedInstallFn = runtime.install as jest.Mock
-
- act(() => {
- mockedInstallFn.mock.calls[0][0].onUpdateReady()
- })
-
- expect(runtime.applyUpdate).toHaveBeenCalled()
- })
-
- /* eslint-disable-next-line max-len */
- it('should set isNewVersionAvailable to true when offline-plugin/runtime finish updating service worker with new contents', () => {
- const { result } = renderHook(() => useOfflinePLugin())
- const mockedInstallFn = runtime.install as jest.Mock
-
- act(() => {
- mockedInstallFn.mock.calls[0][0].onUpdated()
- })
-
- expect(result.current.isNewVersionAvailable).toBe(true)
- })
-})
diff --git a/packages/elements/src/hooks/use-offline-plugin/index.ts b/packages/elements/src/hooks/use-offline-plugin/index.ts
deleted file mode 100644
index 914f4fe08f..0000000000
--- a/packages/elements/src/hooks/use-offline-plugin/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './use-offline-plugin'
diff --git a/packages/elements/src/hooks/use-offline-plugin/use-offline-plugin.tsx b/packages/elements/src/hooks/use-offline-plugin/use-offline-plugin.tsx
deleted file mode 100644
index 725f93842f..0000000000
--- a/packages/elements/src/hooks/use-offline-plugin/use-offline-plugin.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import * as runtime from 'offline-plugin/runtime'
-
-// this part will be translated by building
-runtime.install({
- onUpdateReady: () => {
- // Tells to new SW to take control immediately
- runtime.applyUpdate()
- },
- onUpdated: () => {
- // Have to use window to reference since hook can't be referenced in build time
- ;(window as any).setIsNewVersionAvailable(true)
- },
-})
-
-import { useState, useEffect } from 'react'
-
-type UseOfflinePLugin = () => {
- isNewVersionAvailable: boolean
-}
-
-export const useOfflinePLugin: UseOfflinePLugin = () => {
- const [isNewVersionAvailable, setIsNewVersionAvailable] = useState(false)
- useEffect(() => {
- ;(window as any).setIsNewVersionAvailable = setIsNewVersionAvailable
- })
-
- useEffect(() => {})
-
- return {
- isNewVersionAvailable,
- }
-}
diff --git a/packages/elements/src/index.tsx b/packages/elements/src/index.tsx
index 918e5d8bfa..365918325e 100644
--- a/packages/elements/src/index.tsx
+++ b/packages/elements/src/index.tsx
@@ -1,7 +1,6 @@
import * as v2 from './v2'
// Hooks
export * from './hooks/UsePortal'
-export * from './hooks/use-offline-plugin'
// Dependencies
export * from 'formik'
diff --git a/packages/geo-diary-v2/src/core/app.tsx b/packages/geo-diary-v2/src/core/app.tsx
index 69626211ff..9bd4e46b20 100644
--- a/packages/geo-diary-v2/src/core/app.tsx
+++ b/packages/geo-diary-v2/src/core/app.tsx
@@ -1,6 +1,3 @@
-import * as OfflinePluginRuntime from 'offline-plugin/runtime'
-OfflinePluginRuntime.install()
-
import * as React from 'react'
import { ApolloProvider } from '@apollo/react-hooks'
import { useAuth } from '@/hooks/use-auth'
diff --git a/packages/geo-diary/src/core/__tests__/__snapshots__/app.tsx.snap b/packages/geo-diary/src/core/__tests__/__snapshots__/app.tsx.snap
index 951cd42ff9..f1d00d13e8 100644
--- a/packages/geo-diary/src/core/__tests__/__snapshots__/app.tsx.snap
+++ b/packages/geo-diary/src/core/__tests__/__snapshots__/app.tsx.snap
@@ -15,11 +15,5 @@ exports[`App should match a snapshot 1`] = `
-
`;
diff --git a/packages/geo-diary/src/core/app.tsx b/packages/geo-diary/src/core/app.tsx
index 9482c68947..3e4804c5c6 100644
--- a/packages/geo-diary/src/core/app.tsx
+++ b/packages/geo-diary/src/core/app.tsx
@@ -2,27 +2,15 @@ import '../styles/index.scss'
import React from 'react'
import { Provider } from 'react-redux'
import Router from './router'
-import { PortalProvider, useOfflinePLugin } from '@reapit/elements'
+import { PortalProvider } from '@reapit/elements'
import store from './store'
-import { ToastMessage as ReapitElementsToastMessage } from '@reapit/elements'
const App = () => {
- const bindedWindowLocation = React.useMemo(() => window.location.reload.bind(window.location), [])
- const { isNewVersionAvailable } = useOfflinePLugin()
-
return (
-
)
}
diff --git a/packages/lifetime-legal/src/core/__tests__/__snapshots__/app.tsx.snap b/packages/lifetime-legal/src/core/__tests__/__snapshots__/app.tsx.snap
index a7a7fd202f..f1d00d13e8 100644
--- a/packages/lifetime-legal/src/core/__tests__/__snapshots__/app.tsx.snap
+++ b/packages/lifetime-legal/src/core/__tests__/__snapshots__/app.tsx.snap
@@ -14,12 +14,6 @@ exports[`App should match a snapshot 1`] = `
>
-
`;
diff --git a/packages/lifetime-legal/src/core/app.tsx b/packages/lifetime-legal/src/core/app.tsx
index 5f16291ad2..ebbeced20e 100644
--- a/packages/lifetime-legal/src/core/app.tsx
+++ b/packages/lifetime-legal/src/core/app.tsx
@@ -1,25 +1,14 @@
-import { PortalProvider, useOfflinePLugin, ToastMessage } from '@reapit/elements'
+import { PortalProvider } from '@reapit/elements'
import Router from './router'
import { Provider } from 'react-redux'
import store from './store'
import * as React from 'react'
const App = () => {
- const bindedWindowLocation = React.useMemo(() => window.location.reload.bind(window.location), [])
- const { isNewVersionAvailable } = useOfflinePLugin()
-
return (
-
)
diff --git a/packages/marketplace/src/components/pages/admin-apps/__tests__/__snapshots__/admin-apps.test.tsx.snap b/packages/marketplace/src/components/pages/admin-apps/__tests__/__snapshots__/admin-apps.test.tsx.snap
index bcb4c68db6..50ab1a808d 100644
--- a/packages/marketplace/src/components/pages/admin-apps/__tests__/__snapshots__/admin-apps.test.tsx.snap
+++ b/packages/marketplace/src/components/pages/admin-apps/__tests__/__snapshots__/admin-apps.test.tsx.snap
@@ -396,7 +396,7 @@ exports[`admin-apps AdminApprovals should match a snapshot 1`] = `
allowSameDay={false}
className="input is-primary"
customInput={
-
}
@@ -468,7 +468,7 @@ exports[`admin-apps AdminApprovals should match a snapshot 1`] = `
-
-
-
+
@@ -575,7 +575,7 @@ exports[`admin-apps AdminApprovals should match a snapshot 1`] = `
allowSameDay={false}
className="input is-primary"
customInput={
-