Skip to content

Commit

Permalink
Change styles for genres list, remove wrapper to this list and replac…
Browse files Browse the repository at this point in the history
…e Box with div
  • Loading branch information
TebyakinaEkaterina committed Aug 16, 2024
1 parent a02b143 commit 39bdfcf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.list {
width: 100%;
overflow-y: auto;
border: 1px var(--border-color) solid;
height: calc(100% - var(--form-field-height) - (2 * var(--space-s)));

/* Used important to override material styles. */
padding-top: 0 !important;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
.main__section {
min-width: 320px;
border: 1px var(--border-color) solid;
}

.main__section__list {
flex-grow: 1;
overflow-y: auto;
border: 1px var(--border-color) solid;
height: calc(100% - var(--form-field-height) - (2 * var(--space-s)));
}

.main__details {
Expand Down
19 changes: 7 additions & 12 deletions apps/react/src/features/genres/pages/GenresPage/GenresPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { memo, useEffect, FC } from 'react';
import { fetchGenres } from '@js-camp/react/store/genre/dispatchers';
import { selectGenres, selectAreGenresLoading } from '@js-camp/react/store/genre/selectors';
import { useAppDispatch, useAppSelector } from '@js-camp/react/store';
import { Box } from '@mui/material';
import { Outlet } from 'react-router-dom';

import { GenresList } from '../../components/GenresList';
Expand All @@ -26,20 +25,16 @@ const GenresPageComponent: FC = () => {

return (
<main className={styles.main}>
<Box className={styles.main__section}>
<GenresFilterForm/>
<Box className={styles.main__section__list}>
<GenresList genres={genres} />
</Box>
</Box>
<Box className={styles.main__details}>
<div className={styles.main__section}>
<GenresFilterForm />
<GenresList genres={genres} />
</div>
<div className={styles.main__details}>
<Outlet />
</Box>
</div>
</main>
);
};

/**
* Memorized genres page component.
*/
/** Memorized genres page component. */
export const GenresPage = memo(GenresPageComponent);

0 comments on commit 39bdfcf

Please sign in to comment.