Skip to content

Commit

Permalink
fix(client): use default export of package.json
Browse files Browse the repository at this point in the history
- property import deprecated
  • Loading branch information
neopostmodern committed Aug 4, 2022
1 parent a9fb8b9 commit 689b4c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions client/src/renderer/containers/AuthWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery } from '@apollo/client';
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { version as currentPackageVersion } from '../../../package.json';
import packageJson from '../../../package.json';
import { requestLogin } from '../actions/userInterface';
import FatalApolloError from '../components/FatalApolloError';
import LoginView from '../components/LoginView';
Expand All @@ -20,7 +20,7 @@ const AuthWrapper: React.FC<React.PropsWithChildren<{}>> = ({ children }) => {
useQuery<ProfileQuery, ProfileQueryVariables>(PROFILE_QUERY, {
fetchPolicy: gracefulNetworkPolicy(),
variables: {
currentVersion: currentPackageVersion,
currentVersion: packageJson.version,
},
})
);
Expand Down Expand Up @@ -68,7 +68,7 @@ const AuthWrapper: React.FC<React.PropsWithChildren<{}>> = ({ children }) => {
<>
<VersionMarks
versions={profileQuery.data.versions}
currentPackageVersion={currentPackageVersion}
currentPackageVersion={packageJson.version}
/>
<LoginView
openLoginModal={(): void => {
Expand Down
6 changes: 3 additions & 3 deletions client/src/renderer/containers/ComplexLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AccountCircle, LocalOffer, Settings } from '@mui/icons-material';
import { CircularProgress, Stack } from '@mui/material';
import React, { useEffect, useMemo } from 'react';
import { useSelector } from 'react-redux';
import { version as currentPackageVersion } from '../../../package.json';
import packageJson from '../../../package.json';
import Centered from '../components/Centered';
import FatalApolloError from '../components/FatalApolloError';
import Gap from '../components/Gap';
Expand Down Expand Up @@ -44,7 +44,7 @@ const ComplexLayout: React.FC<
useQuery<ProfileQuery>(PROFILE_QUERY, {
fetchPolicy: gracefulNetworkPolicy('cache-first'),
variables: {
currentVersion: currentPackageVersion,
currentVersion: packageJson.version,
},
})
);
Expand Down Expand Up @@ -113,7 +113,7 @@ const ComplexLayout: React.FC<
? profileQuery.data.versions
: 'loading'
}
currentPackageVersion={currentPackageVersion}
currentPackageVersion={packageJson.version}
/>
{profileQuery.state === DataState.LOADING || loading ? (
<Centered>
Expand Down

0 comments on commit 689b4c4

Please sign in to comment.