diff --git a/client/package-lock.json b/client/package-lock.json index c58d4fc..c09bf12 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -17,13 +17,13 @@ "@mui/icons-material": "^5.1.0", "@mui/material": "^5.1.0", "date-fns": "^2.25.0", + "flag-icons": "^6.9.2", "graphql": "^16.0.1", "material-ui-confirm": "^3.0.2", "notistack": "^2.0.3", "phoenix": "^1.6.2", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-flag-icon-css": "^1.0.25", "react-router-dom": "^6.0.2", "react-timeago": "^7.1.0", "react-virtualized-auto-sizer": "^1.0.6", @@ -5070,11 +5070,6 @@ "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, - "node_modules/classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" - }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -6231,11 +6226,10 @@ "node": ">=8" } }, - "node_modules/flag-icon-css": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-3.5.0.tgz", - "integrity": "sha512-pgJnJLrtb0tcDgU1fzGaQXmR8h++nXvILJ+r5SmOXaaL/2pocunQo2a8TAXhjQnBpRLPtZ1KCz/TYpqeNuE2ew==", - "deprecated": "The project has been renamed to flag-icons" + "node_modules/flag-icons": { + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/flag-icons/-/flag-icons-6.9.2.tgz", + "integrity": "sha512-zN/v2PJYdM0N/9R82KM99aRUtfLhj0WbFspOj1Ha1RZbwD7K2/4mMm2Qz8ujFli0d79gx2RgZ71astcXsHMdSA==" }, "node_modules/flat-cache": { "version": "3.0.4", @@ -9692,23 +9686,6 @@ "react": "^18.2.0" } }, - "node_modules/react-flag-icon-css": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/react-flag-icon-css/-/react-flag-icon-css-1.0.25.tgz", - "integrity": "sha512-UJll3zpmbZvkwZvu4HI00iGF8ya4OdFzMR5k3cAluIwdHn8l5cB3CPYt+hw0tt7fLKaYIfncxNEO/qTtvBw2qw==", - "dependencies": { - "classnames": "^2.2.6", - "flag-icon-css": "^3.2.1", - "prop-types": "^15.6.2" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "react": "^0.14 || ^15.0 || ^16.0", - "react-dom": "^0.14 || ^15.0 || ^16.0" - } - }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -14774,11 +14751,6 @@ "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, - "classnames": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", - "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" - }, "cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -15642,10 +15614,10 @@ "path-exists": "^4.0.0" } }, - "flag-icon-css": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-3.5.0.tgz", - "integrity": "sha512-pgJnJLrtb0tcDgU1fzGaQXmR8h++nXvILJ+r5SmOXaaL/2pocunQo2a8TAXhjQnBpRLPtZ1KCz/TYpqeNuE2ew==" + "flag-icons": { + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/flag-icons/-/flag-icons-6.9.2.tgz", + "integrity": "sha512-zN/v2PJYdM0N/9R82KM99aRUtfLhj0WbFspOj1Ha1RZbwD7K2/4mMm2Qz8ujFli0d79gx2RgZ71astcXsHMdSA==" }, "flat-cache": { "version": "3.0.4", @@ -18156,16 +18128,6 @@ "scheduler": "^0.23.0" } }, - "react-flag-icon-css": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/react-flag-icon-css/-/react-flag-icon-css-1.0.25.tgz", - "integrity": "sha512-UJll3zpmbZvkwZvu4HI00iGF8ya4OdFzMR5k3cAluIwdHn8l5cB3CPYt+hw0tt7fLKaYIfncxNEO/qTtvBw2qw==", - "requires": { - "classnames": "^2.2.6", - "flag-icon-css": "^3.2.1", - "prop-types": "^15.6.2" - } - }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", diff --git a/client/package.json b/client/package.json index 6647df1..c137e23 100644 --- a/client/package.json +++ b/client/package.json @@ -20,13 +20,13 @@ "@mui/icons-material": "^5.1.0", "@mui/material": "^5.1.0", "date-fns": "^2.25.0", + "flag-icons": "^6.9.2", "graphql": "^16.0.1", "material-ui-confirm": "^3.0.2", "notistack": "^2.0.3", "phoenix": "^1.6.2", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-flag-icon-css": "^1.0.25", "react-router-dom": "^6.0.2", "react-timeago": "^7.1.0", "react-virtualized-auto-sizer": "^1.0.6", diff --git a/client/src/components/FlagIcon/FlagIcon.css b/client/src/components/FlagIcon/FlagIcon.css index ebd692d..a226685 100644 --- a/client/src/components/FlagIcon/FlagIcon.css +++ b/client/src/components/FlagIcon/FlagIcon.css @@ -1,7 +1,11 @@ -.flag-icon-tw { +.fi-size-lg { + font-size: 1.35em; +} + +.fi-tw { background-image: url("./images/4x3/tw.svg"); } -.flag-icon-tw.flag-icon-squared { +.fi-tw.fis { background-image: url("./images/1x1/tw.svg"); } diff --git a/client/src/components/FlagIcon/FlagIcon.jsx b/client/src/components/FlagIcon/FlagIcon.jsx index 4db5b5c..598dd1e 100644 --- a/client/src/components/FlagIcon/FlagIcon.jsx +++ b/client/src/components/FlagIcon/FlagIcon.jsx @@ -1,8 +1,12 @@ import React from "react"; -import FlagIconFactory from "react-flag-icon-css"; +import "flag-icons/css/flag-icons.min.css"; import "./FlagIcon.css"; -const FlagIcon = FlagIconFactory(React, { useCssModules: false }); +function FlagIcon({ code, size }) { + return ( + + ); +} export default FlagIcon;