remove manually created typing d ts file (#249)
* Rename file ".d.ts" files are files that are automatically generated during compilation (in case option is set) and shouldn't be created manually. * Export types and interfaces * Add missing imports
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Box, styled } from '@mui/system';
|
||||
import { IReaderSettings } from 'typings';
|
||||
|
||||
const Image = styled('img')({
|
||||
marginBottom: 0,
|
||||
|
||||
@@ -9,6 +9,7 @@ import React, { useRef } from 'react';
|
||||
import SpinnerImage from 'components/util/SpinnerImage';
|
||||
import useLocalStorage from 'util/useLocalStorage';
|
||||
import Box from '@mui/system/Box';
|
||||
import { IReaderSettings } from 'typings';
|
||||
|
||||
function imageStyle(settings: IReaderSettings): any {
|
||||
const [dimensions, setDimensions] = React.useState({
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Box } from '@mui/system';
|
||||
import { IReaderSettings } from 'typings';
|
||||
|
||||
interface IProps {
|
||||
settings: IReaderSettings;
|
||||
|
||||
@@ -11,6 +11,7 @@ import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction';
|
||||
import Select from '@mui/material/Select';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import React from 'react';
|
||||
import { IReaderSettings } from 'typings';
|
||||
|
||||
interface IProps extends IReaderSettings {
|
||||
setSettingValue: (key: keyof IReaderSettings, value: string | boolean) => void;
|
||||
|
||||
@@ -10,6 +10,7 @@ import ReactDOM from 'react-dom';
|
||||
import { Box } from '@mui/system';
|
||||
import Page from 'components/reader/Page';
|
||||
import DoublePage from 'components/reader/DoublePage';
|
||||
import { IReaderProps } from 'typings';
|
||||
|
||||
const isSpreadPage = (image: HTMLImageElement): boolean => {
|
||||
const aspectRatio = image.height / image.width;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/system';
|
||||
import Page from 'components/reader/Page';
|
||||
import { IReaderProps } from 'typings';
|
||||
|
||||
const findCurrentPageIndex = (wrapper: HTMLDivElement): number => {
|
||||
for (let i = 0; i < wrapper.children.length; i++) {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/system';
|
||||
import Page from 'components/reader/Page';
|
||||
import { IReaderProps } from 'typings';
|
||||
|
||||
export default function PagedReader(props: IReaderProps) {
|
||||
const { pages, settings, setCurPage, initialPage, curPage, nextChapter, prevChapter } = props;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
import React, { useCallback, useEffect, useRef } from 'react';
|
||||
import { Box } from '@mui/system';
|
||||
import Page from 'components/reader/Page';
|
||||
import { IReaderProps } from 'typings';
|
||||
|
||||
const findCurrentPageIndex = (wrapper: HTMLDivElement): number => {
|
||||
for (let i = 0; i < wrapper.children.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user