Fix/vite tsconfig setup (#404)
* Use "create-vite"s tsconfig files setup The previous tsconfig file caused issues with vite throwing "missing identifiers of modules" errors * Remove unused React imports Starting with React 17 the nex JSX transform is being used
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
import { Box, styled } from '@mui/material';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
|
||||
@@ -26,7 +26,7 @@ interface IProps {
|
||||
settings: IReaderSettings;
|
||||
}
|
||||
|
||||
const DoublePage = React.forwardRef((props: IProps, ref: any) => {
|
||||
const DoublePage = forwardRef((props: IProps, ref: any) => {
|
||||
const { image1src, image2src, index, settings } = props;
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import React, { useRef } from 'react';
|
||||
import { useState, useEffect, forwardRef, useRef } from 'react';
|
||||
import Box from '@mui/material/Box';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
import SpinnerImage from '@/components/util/SpinnerImage';
|
||||
|
||||
function imageStyle(settings: IReaderSettings): any {
|
||||
const [dimensions, setDimensions] = React.useState({
|
||||
const [dimensions, setDimensions] = useState({
|
||||
height: window.innerHeight,
|
||||
width: window.innerWidth,
|
||||
});
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
function handleResize() {
|
||||
setDimensions({
|
||||
height: window.innerHeight,
|
||||
@@ -65,7 +65,7 @@ interface IProps {
|
||||
settings: IReaderSettings;
|
||||
}
|
||||
|
||||
const Page = React.forwardRef((props: IProps, ref: any) => {
|
||||
const Page = forwardRef((props: IProps, ref: any) => {
|
||||
const { src, index, onImageLoad, settings } = props;
|
||||
|
||||
const imgRef = useRef<HTMLImageElement>(null);
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import { List, ListItem, ListItemText, Switch } from '@mui/material';
|
||||
import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import Select from '@mui/material/Select';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IReaderSettings } from '@/typings';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { IReaderProps } from '@/typings';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import { IReaderProps } from '@/typings';
|
||||
import Page from '@/components/reader/Page';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import { IReaderProps } from '@/typings';
|
||||
import Page from '@/components/reader/Page';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import React, { useCallback, useEffect, useRef } from 'react';
|
||||
import { useCallback, useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/material';
|
||||
import { IReaderProps } from '@/typings';
|
||||
import Page from '@/components/reader/Page';
|
||||
|
||||
Reference in New Issue
Block a user