Skip to content

Commit

Permalink
Merge pull request #1470 from nextstrain/refactor/cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov authored Jun 3, 2024
2 parents 1f6c657 + d8a46b1 commit 29c49e5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 384 deletions.
318 changes: 0 additions & 318 deletions packages/nextclade-web/src/components/Layout/WhatsNewButton.tsx

This file was deleted.

17 changes: 2 additions & 15 deletions packages/nextclade-web/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,8 @@ import {
virusPropertiesInputAtom,
} from 'src/state/inputs.state'
import { localeAtom } from 'src/state/locale.state'
import {
changelogIsShownAtom,
changelogLastVersionSeenAtom,
changelogShouldShowOnUpdatesAtom,
isInitializedAtom,
} from 'src/state/settings.state'
import { isInitializedAtom } from 'src/state/settings.state'
import { configureStore } from 'src/state/store'
import { shouldShowChangelog } from 'src/state/utils/changelog'
import { ThemeProvider } from 'styled-components'
import { Provider as ReactReduxProvider } from 'react-redux'
import { I18nextProvider } from 'react-i18next'
Expand Down Expand Up @@ -64,7 +58,7 @@ RecoilEnv.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED = false
* Dummy component that allows to set recoil state asynchronously. Needed because RecoilRoot's initializeState
* currently only handles synchronous update and any calls to set() from promises have no effect
*/
export function RecoilStateInitializer() {
function RecoilStateInitializer() {
const router = useRouter()

// NOTE: Do manual parsing, because router.query is randomly empty on the first few renders and on repeated renders.
Expand Down Expand Up @@ -140,13 +134,6 @@ export function RecoilStateInitializer() {

return undefined
})
.then(async () => {
const changelogShouldShowOnUpdates = await getPromise(changelogShouldShowOnUpdatesAtom)
const changelogLastVersionSeen = await getPromise(changelogLastVersionSeenAtom)
set(changelogIsShownAtom, shouldShowChangelog(changelogLastVersionSeen, changelogShouldShowOnUpdates))
set(changelogLastVersionSeenAtom, (prev) => process.env.PACKAGE_VERSION ?? prev ?? '')
return undefined
})
.then(() => {
setInitialized(true)
return undefined
Expand Down
22 changes: 0 additions & 22 deletions packages/nextclade-web/src/state/settings.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ export const numThreadsAtom = atom<number>({
effects: [persistAtom],
})

export const isSettingsDialogOpenAtom = atom<boolean>({
key: 'isSettingsDialogOpen',
default: false,
})

export const isNewRunPopupShownAtom = atom<boolean>({
key: 'isNewRunPopupShown',
default: false,
})

export const isResultsFilterPanelCollapsedAtom = atom<boolean>({
key: 'isResultsFilterPanelCollapsedAtom',
default: true,
Expand All @@ -53,18 +43,6 @@ export const changelogIsShownAtom = atom<boolean>({
default: false,
})

export const changelogShouldShowOnUpdatesAtom = atom<boolean>({
key: 'changelogShouldShowOnUpdates',
default: true,
effects: [persistAtom],
})

export const changelogLastVersionSeenAtom = atom<string>({
key: 'changelogLastVersionSeen',
default: '',
effects: [persistAtom],
})

export const lastNotifiedAppVersionAtom = atom<string | undefined>({
key: 'lastNotifiedAppVersion',
default: undefined,
Expand Down
Loading

0 comments on commit 29c49e5

Please sign in to comment.