Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/components/Banner.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import "./styling.css"

export default function Banner () {
return (
<>
<header>
<h1>Orbit Report</h1>
</header>
<p>
Click on the buttons to see the satellites in that orbit type
</p>
</>
);
}
15 changes: 12 additions & 3 deletions src/components/Buttons.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import satData from "./satData";
import "./styling.css"

const Buttons = ({ filterByType, setSat, displaySats }) => {
return (
<div>
<button>Placeholder Button</button>
<button>All Orbits</button>
<div className="flex-container">
{displaySats.map((sat, id) => {
return (
<button onClick={() => filterByType(sat)} key={id}>
{sat} Orbit
</button>
);
})}
<button onClick={() => setSat(satData)}>All Orbits</button>
</div>
);
};
Expand Down
32 changes: 22 additions & 10 deletions src/components/Table.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
import "./styling.css"

const Table = ({ sat }) => {
return (
<table>
<thead>
<tr>
<th>Header TBD</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row Data TBD</td>
</tr>
</tbody>
</table>
<tr>
<th>Name</th>
<th>Type of Satellite</th>
<th>Launch Date</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{sat.map((data, id) => {
return (
<tr key={id}>
<td>{data.name}</td>
<td>{data.type}</td>
<td>{data.launchDate}</td>
<td>{data.operational ? "active" : "inactive"}</td>
</tr>
);
})}
</tbody>
</table>
);
};

Expand Down
166 changes: 83 additions & 83 deletions src/components/satData.jsx
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
const satData = [
{
id: 1,
name: "Sirius 1",
type: "Communication",
launchDate: "2007-11-17",
orbitType: "Low",
operational: false
},
{
id: 2,
name: "USA-206 IIRM",
type: "Positioning",
launchDate: "2009-08-17",
orbitType: "Medium",
operational: true
},
{
id: 3,
name: "Vanguard 1",
type: "Probe",
launchDate: "1958-03-17",
orbitType: "High",
operational: false
},
{
id: 4,
name: "SNAP 10-A",
type: "Space Station",
launchDate: "1965-11-01",
orbitType: "High",
operational: false
},
{
id: 5,
name: "Hubble Space Telescope",
type: "Telescope",
launchDate: "1990-05-24",
orbitType: "Low",
operational: true
},
{
id: 6,
name: "Envisat",
type: "Probe",
launchDate: "2002-03-01",
orbitType: "Low",
operational: false
},
{
id: 7,
name: "Thermal Blanket",
type: "Space Debris",
launchDate: "N/A",
orbitType: "Low",
operational: false
},
{
id: 8,
name: "Morelos III",
type: "Communication",
launchDate: "2012-12-19",
orbitType: "Low",
operational: true
},
{
id: 9,
name: "IIR-M",
type: "Positioning",
launchDate: "2007-08-17",
orbitType: "Low",
operational: true
},
{
id: 10,
name: "ISS",
type: "Space Station",
launchDate: "1998-11-20",
orbitType: "Low",
operational: true
}
];
export default satData;
{
id: 1,
name: "Sirius 1",
type: "Communication",
launchDate: "2007-11-17",
orbitType: "Low",
operational: false
},
{
id: 2,
name: "USA-206 IIRM",
type: "Positioning",
launchDate: "2009-08-17",
orbitType: "Medium",
operational: true
},
{
id: 3,
name: "Vanguard 1",
type: "Probe",
launchDate: "1958-03-17",
orbitType: "High",
operational: false
},
{
id: 4,
name: "SNAP 10-A",
type: "Space Station",
launchDate: "1965-11-01",
orbitType: "High",
operational: false
},
{
id: 5,
name: "Hubble Space Telescope",
type: "Telescope",
launchDate: "1990-05-24",
orbitType: "Low",
operational: true
},
{
id: 6,
name: "Envisat",
type: "Probe",
launchDate: "2002-03-01",
orbitType: "Low",
operational: false
},
{
id: 7,
name: "Thermal Blanket",
type: "Space Debris",
launchDate: "N/A",
orbitType: "Low",
operational: false
},
{
id: 8,
name: "Morelos III",
type: "Communication",
launchDate: "2012-12-19",
orbitType: "Low",
operational: true
},
{
id: 9,
name: "IIR-M",
type: "Positioning",
launchDate: "2007-08-17",
orbitType: "Low",
operational: true
},
{
id: 10,
name: "ISS",
type: "Space Station",
launchDate: "1998-11-20",
orbitType: "Low",
operational: true
}
];

export default satData;
11 changes: 10 additions & 1 deletion src/components/styling.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ p {
font-family: Montserrat, Arial, Helvetica, sans-serif;
text-align: center;
}

.header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
button {
background-color: #5c94ce;
border-radius: 15px;
Expand Down