prevent import of window
This commit is contained in:
parent
6132b2657a
commit
7acedc32a4
|
@ -1,4 +1,4 @@
|
|||
import { Link, LinkProps } from '@mui/material';
|
||||
import Link, { LinkProps } from '@mui/material/Link';
|
||||
import React, { FC } from 'react';
|
||||
import { ButtonProps } from 'react-bootstrap';
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { runningInBrowser } from 'utils/common';
|
||||
import { logError } from 'utils/sentry';
|
||||
|
||||
class DesktopService {
|
||||
private ElectronAPIs: any;
|
||||
private allElectronAPIsExist: boolean = false;
|
||||
constructor() {
|
||||
this.ElectronAPIs = runningInBrowser() && window['ElectronAPIs'];
|
||||
this.ElectronAPIs = globalThis['ElectronAPIs'];
|
||||
this.allElectronAPIsExist = !!this.ElectronAPIs?.getEncryptionKey;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Box, Typography } from '@mui/material';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Box from '@mui/material/Box';
|
||||
import Link from '@mui/material/Link';
|
||||
import LinkButton from 'components/pages/gallery/LinkButton';
|
||||
import React from 'react';
|
||||
|
@ -395,7 +396,9 @@ const englishConstants = {
|
|||
},
|
||||
PHOTO_COUNT: (count: number) =>
|
||||
`${
|
||||
count === 1
|
||||
!count
|
||||
? 'No memory'
|
||||
: count === 1
|
||||
? `1 memory`
|
||||
: `${formatNumberWithCommas(count)} memories`
|
||||
}`,
|
||||
|
|
Loading…
Reference in a new issue