mirror of
https://github.com/calli-eve/eve-pi.git
synced 2026-02-17 21:19:50 +01:00
refactor compact mode to theme provider
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import { AccessToken } from "@/types";
|
||||
import { Box, Stack, Typography } from "@mui/material";
|
||||
import { Box, Stack, Typography, useTheme } from "@mui/material";
|
||||
import { CharacterRow } from "../Characters/CharacterRow";
|
||||
import { PlanetaryInteractionRow } from "../PlanetaryInteraction/PlanetaryInteractionRow";
|
||||
import { useContext } from "react";
|
||||
import { SessionContext } from "@/app/context/Context";
|
||||
|
||||
export const AccountCard = ({
|
||||
characters,
|
||||
@@ -12,12 +10,12 @@ export const AccountCard = ({
|
||||
characters: AccessToken[];
|
||||
sessionReady: boolean;
|
||||
}) => {
|
||||
const { compactMode } = useContext(SessionContext);
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
padding: 1,
|
||||
borderBottom: compactMode ? "" : "solid 1px gray",
|
||||
borderBottom: theme.custom.compactMode ? "" : "solid 1px gray",
|
||||
}}
|
||||
>
|
||||
<Typography style={{ fontSize: "0.8rem" }} paddingLeft={2}>
|
||||
|
||||
Reference in New Issue
Block a user