Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/bruno-app/src/providers/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import useTelemetry from './useTelemetry';
import StyledWrapper from './StyledWrapper';
import useOpenAPISyncPolling from './useOpenAPISyncPolling';
import useChangelogOnUpdate from './useChangelogOnUpdate';
import useLegacyStorageCleanup from './useLegacyStorageCleanup';
import { version } from '../../../package.json';

export const AppContext = React.createContext();
Expand All @@ -17,6 +18,7 @@ export const AppProvider = (props) => {
useIpcEvents();
useOpenAPISyncPolling();
useChangelogOnUpdate();
useLegacyStorageCleanup();
const dispatch = useDispatch();

useEffect(() => {
Expand Down
14 changes: 14 additions & 0 deletions packages/bruno-app/src/providers/App/useLegacyStorageCleanup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { useEffect } from 'react';

const LEGACY_STORAGE_KEYS = [
// v3.5.0 v4 migration tab state; feature was removed from main.
'v4-migration'
];

const useLegacyStorageCleanup = () => {
useEffect(() => {
LEGACY_STORAGE_KEYS.forEach((key) => localStorage.removeItem(key));
}, []);
};

export default useLegacyStorageCleanup;
Loading