Skip to content

Commit

Permalink
Homepage styling closing #315 (#317)
Browse files Browse the repository at this point in the history
* Homepage styling closing #315

* prettier
  • Loading branch information
EliasKnudsen authored and GitHub committed Apr 17, 2024
1 parent 455729a commit 883c7b2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export default async function Home() {

return (
<>
<div className="flex min-h-[calc(100vh-73px)] flex-col gap-0 xl:flex-row">
<div className="flex min-h-[calc(100vh-73px)] flex-col gap-0 sm:flex-row">
{/* Stats Container */}
<div className="z-10 flex w-full flex-col border-2 border-r border-gray-600 bg-black md:min-w-[500px] xl:w-1/3">
<div className="z-10 flex w-full flex-col border-b-2 border-l-2 border-r-2 border-t-2 border-gray-600 bg-black md:min-w-[500px] xl:w-1/3">
<SatelliteSelector />
<SatelliteDataHome />
</div>

{/* Globe Container */}
<div className="z-0 w-full overflow-x-hidden border-2 border-t-0 border-gray-600 xl:w-2/3 xl:border-t-2">
<div className="z-0 w-full overflow-x-hidden border-b-2 border-l-2 border-r-2 border-t-0 border-gray-600 sm:border-l-0 sm:border-t-2 xl:w-2/3">
<div className="flex h-full items-center justify-center ">
<SatelliteGlobeNoSSR />
</div>
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/satelliteData/SatelliteDataHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@ export default function SatelliteDataHome() {

return (
<div>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-1">
<div className="border-y border-gray-600 bg-black p-5 md:border-r">
<div className="grid grid-cols-2">
<div className="border border-l-0 border-r-0 border-gray-600 bg-black p-5">
<p className="text-xl font-medium">
{satelliteInfo
? satelliteInfo.velocity + " km/s"
: "Loading..."}
</p>
<p className="text-gray-400">Velocity</p>
</div>
<div className="border-y border-gray-600 bg-black p-5 md:border-l">
<div className="border border-l-2 border-r-0 border-gray-600 bg-black p-5">
<p className="text-xl font-medium">
{satelliteInfo
? satelliteInfo.altitude + " km"
: "Loading..."}
</p>
<p className="text-gray-400">Altitude</p>
</div>
<div className="border-y border-gray-600 bg-black p-5 md:border-r">
<div className="border border-l-0 border-r-0 border-gray-600 bg-black p-5">
<p className="text-xl font-medium">
{satelliteInfo
? satelliteInfo.latitudeDeg + "° N"
: "Loading..."}
</p>
<p className="text-gray-400">Latitude</p>
</div>
<div className="border-y border-gray-600 bg-black p-5 md:border-l">
<div className="border border-l-2 border-r-0 border-gray-600 bg-black p-5">
<p className="text-xl font-medium">
{satelliteInfo
? satelliteInfo.longitudeDeg + "° E"
Expand All @@ -77,7 +77,7 @@ export default function SatelliteDataHome() {
</div>
</div>

<div className="border-t border-gray-600 bg-black p-5">
<div className="border border-b-0 border-l-0 border-r-0 border-gray-600 bg-black p-5 sm:border-b-2">
<div>
<p className="text-xl font-medium">
{satelliteInfo
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ui/launchDateCountDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const LaunchDateCountDown: React.FC<LaunchDateCountDownProps> = ({
return () => clearInterval(intervalId);
}, [launchDateString]);

if (hasLaunched == undefined) {
if (hasLaunched == undefined || launchDateString == undefined) {
return <></>;
}
return (
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lib/data/fetchSatelliteInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export default async function fetchSatelliteInfo({
graphqlData?.data?.satellites?.data[0]?.attributes
?.catalogNumberNORAD ?? undefined,
launchDate:
graphqlData.data.satellites?.data[0]?.attributes?.launchDate ?? "",
graphqlData.data.satellites?.data[0]?.attributes?.launchDate ??
undefined,
};

return satelliteInfo;
Expand Down

0 comments on commit 883c7b2

Please sign in to comment.