Skip to content

Commit

Permalink
Copy URl bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zain55337 committed Oct 29, 2023
1 parent 4410061 commit 5d17a91
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/javascript/components/Report.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import "bootstrap/js/dist/alert";
const Report = () => {
const { id } = useParams();

const [rows, radianceOrIrradiance, measurementLabels] = urlToRows(id);
const [selectedRows, radianceOrIrradiance, measurementLabels] = urlToRows(id);

const sampleCount = rows[0].length - 1;
const selectedRowsSampleCount = selectedRows[0].length - 1;

const [isLoaded, setLoaded] = useState(true);
const [refHAB, setRefHAB] = useState(null);

const powerMode = sampleCount < 6;
const powerMode = selectedRowsSampleCount < 6;

return (
<div className="row">
<div className="col">
<div className="row mt-50 text-center">
<div className="col px-5">
<div
className="mt-3 alert alert-warning alert-dismissible fade show"
className="mt-5 text-center alert alert-warning alert-dismissible fade show"
role="alert"
>
The reproduced spectrum has been compressed and then decompressed, so
Expand All @@ -37,7 +37,7 @@ const Report = () => {
</button>
</div>

<h2 className="my-3">Light Exposure Report</h2>
<h2 className="my-3 mt-5">Light Exposure Report</h2>

<p>
This report meets the{" "}
Expand All @@ -51,16 +51,16 @@ const Report = () => {
{powerMode && (
<Chart
radianceOrIrradiance={radianceOrIrradiance}
rows={rows}
sampleCount={sampleCount}
selectedRows={selectedRows}
selectedRowsSampleCount={selectedRowsSampleCount}
measurementLabels={measurementLabels}
/>
)}
<h2 className="my-3">Stimulus specification tables</h2>

<CalculationTable
rows={rows}
sampleCount={sampleCount}
selectedRows={selectedRows}
selectedRowsSampleCount={selectedRowsSampleCount}
radianceOrIrradiance={radianceOrIrradiance}
measurementLabels={measurementLabels}
isLoaded={isLoaded}
Expand All @@ -72,8 +72,8 @@ const Report = () => {
<h2 className="my-3">Full spectral power distribution</h2>

<SpectraTable
rows={rows}
sampleCount={sampleCount}
selectedRows={selectedRows}
selectedRowsSampleCount={selectedRowsSampleCount}
radianceOrIrradiance={radianceOrIrradiance}
measurementLabels={measurementLabels}
/>
Expand Down
4 changes: 4 additions & 0 deletions src/stylesheets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@
.modal-lg {
--bs-modal-width: 70%;
}

.mt-50 {
margin-top: 50px !important;
}
@media screen and (max-width: 996px) {
.upload-div, .container {
max-width: 95% !important;
Expand Down

0 comments on commit 5d17a91

Please sign in to comment.