🪛 Escaped # in encoded image URI

This commit is contained in:
2021-07-13 06:39:08 -07:00
parent d1074376ea
commit 749ea5778b
6 changed files with 2334 additions and 2303 deletions

View File

@@ -1,6 +1,9 @@
import * as React from "react";
import { IExtractedComicBookCoverFile } from "threetwo-ui-typings";
import { removeLeadingPeriod } from "../shared/utils/formatting.utils";
import {
removeLeadingPeriod,
escapePoundSymbol,
} from "../shared/utils/formatting.utils";
import { isUndefined, isEmpty } from "lodash";
import { Link } from "react-router-dom";
@@ -18,6 +21,13 @@ class Card extends React.Component<IProps, IState> {
public drawCoverCard = (
metadata: IExtractedComicBookCoverFile,
): JSX.Element => {
const filePath = encodeURI(
"http://localhost:3000" +
removeLeadingPeriod(metadata.path) +
"/" +
metadata.name,
);
return (
<div>
<div className="card generic-card">
@@ -25,12 +35,7 @@ class Card extends React.Component<IProps, IState> {
<div className="card-image">
<figure className="image">
<img
src={
"http://localhost:3000" +
removeLeadingPeriod(metadata.path) +
"/" +
metadata.name
}
src={escapePoundSymbol(filePath)}
alt="Placeholder image"
/>
</figure>

View File

@@ -55,7 +55,7 @@ const mapDispatchToProps = (dispatch) => ({
getRecentlyImportedComicBooks({
paginationOptions: {
page: 0,
limit: 17,
limit: 18,
},
}),
);