Skip to content

Commit

Permalink
fix results overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
trentfridey committed Aug 12, 2023
1 parent 1d0bdea commit 37fed70
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
7 changes: 2 additions & 5 deletions src/Results.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#results {
padding: 20px;

}

.result-container {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
width: 100%;
overflow-y: auto;
flex-wrap: wrap;
max-height: 100%;
}

.result-container > * {
Expand Down
40 changes: 20 additions & 20 deletions src/Results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ export default function Results() {

return (
<div id="results">
<div className="result-container">
{!results.length ? (
<div className="results-placeholder">
Press 'Simulate' to view the results here!
{!results.length ? (
<div className="results-placeholder">
Press 'Simulate' to view the results here!
</div>
) : (
results.map((data, i) => (
<div style={{ border: "1px solid black" }} key={i}>
<h2 style={{ alignSelf: "start", background: "black", padding: 5 }}>
Qubit {i + 1}
</h2>
<BlochSphere time={time} data={data} key={"b" + i} />
<LineGraph
key={"lg" + i}
data={data}
onHover={setTime}
time={time}
onBlur={() => setTime(null)}
/>
</div>
) : (
results.map((data, i) => (
<div style={{ border: '1px solid black'}} key={i}>
<h2 style={{alignSelf: 'start', background: 'black', padding: 5}}>Qubit {i+1}</h2>
<BlochSphere time={time} data={data} key={"b" + i} />
<LineGraph
key={"lg" + i}
data={data}
onHover={setTime}
time={time}
onBlur={() => setTime(null)}
/>
</div>
))
)}
</div>
))
)}
</div>
);
}

0 comments on commit 37fed70

Please sign in to comment.