Skip to content

Commit

Permalink
Fixed loadout customization layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoni7 committed Sep 16, 2024
1 parent 9c865ac commit aca8b3b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/routes/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState, useMemo } from 'react';
import { Box, styled } from '@mui/system';
import { useDispatch, useSelector } from 'react-redux';
import { AppDispatch, RootState, store } from '../../store';
import { AppDispatch, RootState } from '../../store';
import { generatePermutations } from '../../features/armor-optimization/generate-permutations';
import {
filterFromSharedLoadout,
Expand Down
9 changes: 3 additions & 6 deletions src/components/LoadoutCustomization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import EquipLoadout from '../features/loadouts/components/EquipLoadout';
import AbilitiesModification from '../features/subclass/AbilitiesModification';
import ShareLoadout from '../features/loadouts/components/ShareLoadout';
import { SubclassConfig } from '../types/d2l-types';
import SaveLoadout from '../features/loadouts/components/SaveLoadout';
import TotalStatsDisplay from '../features/subclass/TotalStatsDisplay';

interface LoadoutCustomizationProps {
Expand Down Expand Up @@ -38,9 +37,7 @@ const LoadoutCustomization: React.FC<LoadoutCustomizationProps> = ({
<Box
sx={{
width: '100vw',
display: 'flex',
flexGrow: 1,
position: 'relative',
height: '100vh',
overflow: 'auto',
'&::before': {
content: '""',
Expand Down Expand Up @@ -83,7 +80,7 @@ const LoadoutCustomization: React.FC<LoadoutCustomizationProps> = ({
}}
/>

<Grid container columns={2} sx={{ position: 'relative', zIndex: 3 }}>
<Grid container columns={2} sx={{ position: 'relative', zIndex: 3, height: '100%' }}>
<Grid item md={1}>
<TransparentButton
onClick={onBackClick}
Expand Down Expand Up @@ -113,7 +110,7 @@ const LoadoutCustomization: React.FC<LoadoutCustomizationProps> = ({
>
<TotalStatsDisplay />
</Grid>
<Grid item md={1} sx={{ textAlign: 'center' }}>
<Grid item md={1} sx={{ textAlign: 'center', alignContent: 'end', paddingBottom: '6px' }}>
<EquipLoadout />
<ShareLoadout />
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/features/armor-optimization/StatsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const StatsTable: React.FC<StatsTableProps> = ({ permutations, onPermutationClic

useEffect(() => {
if (large) {
setItemsPerPage(6);
setItemsPerPage(5);
} else {
setItemsPerPage(4);
}
Expand Down
2 changes: 1 addition & 1 deletion src/features/loadouts/components/SaveLoadout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default function SaveLoadout() {
<>
<Button onClick={() => setLoadoutDrawerOpen(true)}>SAVE IN-GAME</Button>
<Drawer open={loadoutDrawerOpen} anchor="right">
<Box sx={{ width: '24vw' }}>
<Box sx={{ width: '18vw' }}>
{identifiersSet ? SelectLoadoutSlotDrawer : SetIdentifiersDrawer}
</Box>
</Drawer>
Expand Down

0 comments on commit aca8b3b

Please sign in to comment.