mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-06-19 05:11:09 -04:00
Refactor PopupRefer integration and simplify conditional rendering in Viewer
- Updated import from PopupMenu to PopupRefer in popupRefer component. - Removed unused action imports in popupRefer component. - Simplified conditional rendering for PopupRefer in Viewer component by removing format check for currentBook.
This commit is contained in:
18840
src/assets/lib/kookit.min.js
vendored
18840
src/assets/lib/kookit.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,13 +1,7 @@
|
||||
import {
|
||||
handleSelection,
|
||||
handleOpenMenu,
|
||||
handleMenuMode,
|
||||
handleNoteKey,
|
||||
handleRenderNoteFunc,
|
||||
} from "../../../store/actions";
|
||||
import { handleSelection } from "../../../store/actions";
|
||||
import { connect } from "react-redux";
|
||||
import { stateType } from "../../../store";
|
||||
import PopupMenu from "./component";
|
||||
import PopupRefer from "./component";
|
||||
import { withTranslation } from "react-i18next";
|
||||
|
||||
const mapStateToProps = (state: stateType) => {
|
||||
@@ -24,4 +18,4 @@ const actionCreator = {
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
actionCreator
|
||||
)(withTranslation()(PopupMenu as any) as any);
|
||||
)(withTranslation()(PopupRefer as any) as any);
|
||||
|
||||
@@ -494,7 +494,7 @@ class Viewer extends React.Component<ViewerProps, ViewerState> {
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
{this.props.htmlBook && this.props.currentBook.format !== "PDF" ? (
|
||||
{this.props.htmlBook ? (
|
||||
<PopupRefer
|
||||
{...{
|
||||
rendition: this.props.htmlBook.rendition,
|
||||
|
||||
Reference in New Issue
Block a user