Skip to content

Commit

Permalink
feat: test app version checker
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy committed Nov 24, 2023
1 parent 9aa47b9 commit e10f527
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import {
} from 'clients/api/queries/getLatestAppVersion';
import FunctionKey from 'constants/functionKey';

const REFETCH_INTERVAL_MS = 1000 * 60 * 60; // One hour in milliseconds
// const REFETCH_INTERVAL_MS = 1000 * 60 * 60; // One hour in milliseconds
// DEV ONLY
const REFETCH_INTERVAL_MS = 1000 * 10; // 10 seconds in milliseconds
// END DEV ONLY

type Options = QueryObserverOptions<
GetLatestAppVersionOutput,
Expand Down
4 changes: 3 additions & 1 deletion src/containers/AppVersionChecker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { version as APP_VERSION } from 'constants/version';

export const AppVersionChecker: React.FC = () => {
const { t } = useTranslation();
const { data } = useGetLatestAppVersion();
const { data } = useGetLatestAppVersion({
onSettled: (...res) => console.log('Settled', ...res),
});
const latestAppVersion = data?.version;

useEffect(() => {
Expand Down

0 comments on commit e10f527

Please sign in to comment.