Skip to content

Commit

Permalink
Fixing not available satellites
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Graule committed Aug 13, 2024
1 parent 5dfb7e5 commit c2c5046
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
17 changes: 8 additions & 9 deletions frontend/src/app/satellites/SatelliteResponsiveTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,14 @@ export default function SatelliteResponsiveTable({
/>
))
: (satellites ?? []).map((satellite) => (
<TableRow
className="cursor-pointer hover:bg-white hover:text-black"
key={satellite.attributes?.catalogNumberNORAD}
onClick={() =>
handleRowClick(
satellite.attributes?.slug ?? "",
)
}
>
<TableRow
className="cursor-pointer hover:bg-white hover:text-black"
key={satellite.attributes?.catalogNumberNORAD}
{...(satellite.attributes?.catalogNumberNORAD ? {
onClick: () =>
handleRowClick(satellite.attributes?.slug ?? "")
} : {})}
>
<TableCell className="px-6">
{satellite.attributes?.name}
</TableCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ const OrbitDataGraph: React.FC<OrbitDataProps> = ({
<>
{orbitalData && (
<div ref={svgContainer} className="flex w-full flex-col">
<div className="flex mb-5">
<p>Orbital parameters history (source :</p>
<a className="hover:underline" href="https://www.space-track.org/">Space Track</a>
<p>)</p>
</div>
<div className="zoom-container mb-5 flex items-center">
<h2 className="text-grey-400 mx-5 text-2xl">Zoom : </h2>
{/* Scrollbar thumb represents the zoom period selected, in case it fits bad we don't display
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/satellites/[satelliteSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ export default async function SatelliteInfoPage({
</div>
</div>

{/* Orbit data */}
{/* Container for graph of historical orbital data */}
<div className="mt-8 flex w-full flex-col items-center">
{/*Pass the satNum and the launchDate as props to OrbitDataGraph*/}
{/*Pass the historicalData and the launchDate as props to OrbitDataGraph*/}
{noradId ? (
satAttributes?.launchDate ? (
<OrbitDataGraph
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function Footer() {

<div className="flex flex-1 justify-end">
<div className="flex flex-col text-center lg:text-right">
<span className="">NTNU Small Satellite Lab</span>
<a className="hover:underline" href="http://ntnu.edu/smallsat">NTNU Small Satellite Lab</a>
<span className="">Trondheim, Norway</span>
<p>Norwegian University of Science and Technology</p>
<p className="lg:hidden">
Expand Down

0 comments on commit c2c5046

Please sign in to comment.