Skip to content

Commit

Permalink
Update Dockerfile and Review2024Card component; remove unused hooks a…
Browse files Browse the repository at this point in the history
…nd clean up dependencies
  • Loading branch information
joao-vasconcelos committed Jan 8, 2025
1 parent 062bd83 commit f5cacdc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WORKDIR /app

COPY package.json ./

RUN npm install --omit-dev --force \
RUN npm install --omit-dev \
&& npm cache clean --force


Expand Down
8 changes: 2 additions & 6 deletions frontend/components/review-2024/Review2024Card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { Review2024CardSchema } from '@/components/review-2024/_data/cards';
import { Player } from '@lottiefiles/react-lottie-player';
import { useClipboard, useElementSize } from '@mantine/hooks';
import { useClipboard } from '@mantine/hooks';
import { IconCheck, IconShare2 } from '@tabler/icons-react';
import { useState } from 'react';

Expand All @@ -22,7 +22,6 @@ interface CustomCSSProperties extends React.CSSProperties {
'--color-border'?: string
'--color-primary': string
'--color-text': string
'--content-height': string
}

/* * */
Expand All @@ -36,16 +35,13 @@ export function Review2024Card({ cardData, isFirstChild, isLastChild }: Props) {
const [isOpen, setIsOpen] = useState(false);
const clipboard = useClipboard({ timeout: 500 });

const { height: contentHeight, ref: contentRef } = useElementSize();

//
// C. Transform data

const stylesData: CustomCSSProperties = {
'--color-border': cardData.colors.border || 'transparent',
'--color-primary': cardData.colors.primary,
'--color-text': cardData.colors.text,
'--content-height': `${contentHeight}px`,
};

//
Expand All @@ -68,7 +64,7 @@ export function Review2024Card({ cardData, isFirstChild, isLastChild }: Props) {
<p className={styles.headerTitle}>{cardData.header.title}</p>
<p className={styles.headerNumber}>{cardData.header.number}</p>
</div>
<div ref={contentRef} className={styles.content}>
<div className={styles.content}>
<div className={styles.innerWrapper}>
<div className={styles.contentNumber}>
<p className={styles.contentNumberValue}>{cardData.content.number_value}</p>
Expand Down
30 changes: 15 additions & 15 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
},
"dependencies": {
"@lottiefiles/react-lottie-player": "3.5.4",
"@mantine/carousel": "7.15.2",
"@mantine/charts": "7.15.2",
"@mantine/core": "7.15.2",
"@mantine/dates": "7.15.2",
"@mantine/form": "7.15.2",
"@mantine/hooks": "7.15.2",
"@mantine/modals": "7.15.2",
"@mantine/notifications": "7.15.2",
"@mantine/carousel": "7.15.3",
"@mantine/charts": "7.15.3",
"@mantine/core": "7.15.3",
"@mantine/dates": "7.15.3",
"@mantine/form": "7.15.3",
"@mantine/hooks": "7.15.3",
"@mantine/modals": "7.15.3",
"@mantine/notifications": "7.15.3",
"@rajesh896/broprint.js": "2.1.1",
"@tabler/icons-react": "3.26.0",
"@tabler/icons-react": "3.28.1",
"@turf/turf": "7.2.0",
"@vis.gl/react-maplibre": "1.0.0-alpha.4",
"classnames": "2.5.1",
"dayjs": "1.11.13",
"embla-carousel-autoplay": "8.5.1",
"embla-carousel-react": "8.5.1",
"embla-carousel-autoplay": "8.5.2",
"embla-carousel-react": "8.5.2",
"embla-carousel-wheel-gestures": "8.0.1",
"jsonwebtoken": "9.0.2",
"luxon": "3.5.0",
"maplibre-gl": "5.0.0",
"next": "15.1.3",
"next": "15.1.4",
"next-intl": "3.26.3",
"nuqs": "2.3.0",
"react": "19.0.0",
Expand All @@ -47,18 +47,18 @@
"uuid": "11.0.4"
},
"devDependencies": {
"@carrismetropolitana/api-types": "20250106.1451.36",
"@carrismetropolitana/api-types": "20250106.2343.58",
"@carrismetropolitana/eslint": "20250103.1610.23",
"@types/geojson": "7946.0.15",
"@types/jsonwebtoken": "9.0.7",
"@types/luxon": "3.4.2",
"@types/node": "22.10.5",
"@types/react": "19.0.3",
"@types/react": "19.0.4",
"@types/react-dom": "19.0.2",
"postcss": "8.4.49",
"postcss-preset-mantine": "1.17.0",
"postcss-simple-vars": "7.0.1",
"typescript": "5.7.2",
"typescript": "5.7.3",
"typescript-plugin-css-modules": "5.1.0"
},
"overrides": {
Expand Down

0 comments on commit f5cacdc

Please sign in to comment.