Skip to content

Commit

Permalink
Cleanup unused code in movie credit posters
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Dec 25, 2023
1 parent 213620c commit 9921d51
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions frontend/src/Movie/Details/Credits/MovieCreditPosters.js
Expand Up @@ -14,24 +14,6 @@ import 'swiper/css/navigation';
const columnPadding = parseInt(dimensions.movieIndexColumnPadding);
const columnPaddingSmallScreen = parseInt(dimensions.movieIndexColumnPaddingSmallScreen);

const additionalColumnCount = {
small: 3,
medium: 2,
large: 1
};

function calculateColumnWidth(width, posterSize, isSmallScreen) {
const maxiumColumnWidth = isSmallScreen ? 172 : 182;
const columns = Math.floor(width / maxiumColumnWidth);
const remainder = width % maxiumColumnWidth;

if (remainder === 0 && posterSize === 'large') {
return maxiumColumnWidth;
}

return Math.floor(width / (columns + additionalColumnCount[posterSize]));
}

function calculateRowHeight(posterHeight, isSmallScreen) {
const titleHeight = 19;
const characterHeight = 19;
Expand All @@ -46,10 +28,6 @@ function calculateRowHeight(posterHeight, isSmallScreen) {
return heights.reduce((acc, height) => acc + height, 0);
}

function calculatePosterHeight(posterWidth) {
return Math.ceil((250 / 170) * posterWidth);
}

class MovieCreditPosters extends Component {

//
Expand Down

0 comments on commit 9921d51

Please sign in to comment.