diff --git a/src/app/components/PlanetaryInteraction/NoPlanetCard.tsx b/src/app/components/PlanetaryInteraction/NoPlanetCard.tsx
index a30f069..b2740db 100644
--- a/src/app/components/PlanetaryInteraction/NoPlanetCard.tsx
+++ b/src/app/components/PlanetaryInteraction/NoPlanetCard.tsx
@@ -1,6 +1,4 @@
-import { SessionContext } from "@/app/context/Context";
-import { Box, Stack, Typography, styled } from "@mui/material";
-import { useContext } from "react";
+import { Box, Stack, Typography, styled, useTheme } from "@mui/material";
const StackItem = styled(Stack)(({ theme }) => ({
...theme.typography.body2,
@@ -12,20 +10,19 @@ const StackItem = styled(Stack)(({ theme }) => ({
}));
export const NoPlanetCard = ({}: {}) => {
- const { compactMode } = useContext(SessionContext);
+ const theme = useTheme();
return (
- No planet
+ No planet
);
};
diff --git a/src/app/components/PlanetaryInteraction/PlanetCard.tsx b/src/app/components/PlanetaryInteraction/PlanetCard.tsx
index 3d46f34..6358a77 100644
--- a/src/app/components/PlanetaryInteraction/PlanetCard.tsx
+++ b/src/app/components/PlanetaryInteraction/PlanetCard.tsx
@@ -1,4 +1,4 @@
-import { Stack, Typography, styled } from "@mui/material";
+import { Stack, Typography, styled, useTheme } from "@mui/material";
import Image from "next/image";
import { AccessToken, Planet } from "@/types";
import { Api } from "@/esi-api";
@@ -15,7 +15,6 @@ import Toolbar from "@mui/material/Toolbar";
import IconButton from "@mui/material/IconButton";
import CloseIcon from "@mui/icons-material/Close";
import Button from "@mui/material/Button";
-import { SessionContext } from "@/app/context/Context";
const StackItem = styled(Stack)(({ theme }) => ({
...theme.typography.body2,
@@ -110,7 +109,7 @@ export const PlanetCard = ({
const [planetRenderOpen, setPlanetRenderOpen] = useState(false);
- const { compactMode } = useContext(SessionContext);
+ const theme = useTheme();
const handle3DrenderOpen = () => {
setPlanetRenderOpen(true);
@@ -171,13 +170,13 @@ export const PlanetCard = ({
alignItems="flex-start"
height="100%"
position="relative"
- minHeight={compactMode ? "100px" : "170px"}
+ minHeight={theme.custom.cardMinHeight}
>
@@ -196,8 +195,12 @@ export const PlanetCard = ({
/>
)}
- {planetInfoUniverse?.name}
- L{planet.upgrade_level}
+
+ {planetInfoUniverse?.name}
+
+
+ L{planet.upgrade_level}
+
{extractors.map((e, idx) => {
@@ -205,7 +208,7 @@ export const PlanetCard = ({
{e ? (
({
...theme.typography.body2,
- padding: theme.spacing(2),
+ padding: theme.custom.compactMode ? theme.spacing(1) : theme.spacing(2),
textAlign: "left",
justifyContent: "center",
alignItems: "center",