Skip to content

Commit

Permalink
corrected spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesoroka committed Nov 13, 2024
1 parent 3a7b6e8 commit f120f1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions components/ImageSelect/ImageSelect.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* eslint-disable react/prop-types */
import { Navigate } from "react-router-dom";
export default function ImageSelect({ data, imageSelected, setImageSelected }) {



const renderImageSelect =
data &&
data.map((img, i) => (
Expand All @@ -12,19 +9,23 @@ export default function ImageSelect({ data, imageSelected, setImageSelected }) {
onClick={() => {
setImageSelected(img.value);
}}
className={`${imageSelected == img.value ? "imageSelected" : "imageNonSelected"
}`}
className={`${
imageSelected == img.value ? "imageSelected" : "imageNonSelected"
}`}
>
{imageSelected && (
<Navigate to={`?domain=${imageSelected}`} replace={true} />
)}

<img src={img.imageLink} width={200} height={"auto"} />
<p className="imgCaption">
{img.score &&
<span style={{ color: "#D20003", fontSize: "12px" }}>{parseFloat(img.score).toFixed(3)}&nbsp;&nbsp;<span style={{ color: "#000" }}>|</span>&nbsp;&nbsp;</span>}
{img.score && (
<span style={{ color: "#D20003", fontSize: "12px" }}>
{parseFloat(img.score).toFixed(3)}&nbsp;&nbsp;
<span style={{ color: "#000" }}>|</span>&nbsp;&nbsp;
</span>
)}
<span>{img.text}</span>

</p>
</div>
));
Expand All @@ -36,7 +37,7 @@ export default function ImageSelect({ data, imageSelected, setImageSelected }) {
{data && data.length > 0 ? (
renderImageSelect
) : (
<p style={{ color: "darkred" }}>Sorry, no data avaible</p>
<p style={{ color: "darkred" }}>Sorry, no data available</p>
)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Sample from "../Sample/Sample";
import UploadFile from "../UploadFile/UploadFile";
import Wavelengths from "../Wavelengths/Wavelengths";

const errorMsg = "Sorry, no data avaible";
const errorMsg = "Sorry, no data available";

export default function Sidebar({
reference,
Expand Down

0 comments on commit f120f1f

Please sign in to comment.