diff --git a/.env.example b/.env.example index adf2720..194cf79 100644 --- a/.env.example +++ b/.env.example @@ -4,5 +4,10 @@ DB_USERNAME= DB_PASSWORD= DB_CLASSNAME= +OAUTH_GOOGLE_CLIENT_ID= +OAUTH_GOOGLE_CLIENT_SECRET= + FB_CONFIG_PATH= -FB_BUCKET= \ No newline at end of file +FB_BUCKET= + +TOKEN_KEY= \ No newline at end of file diff --git a/src/main/front/src/components/FeedCardGallery.jsx b/src/main/front/src/components/FeedCardGallery.jsx index cc7bed1..2fc58e7 100644 --- a/src/main/front/src/components/FeedCardGallery.jsx +++ b/src/main/front/src/components/FeedCardGallery.jsx @@ -1,13 +1,13 @@ - import "./FeedCardGallery.css"; import { getExtensionFromUrl, isImage, isVideo } from "../tools/tools"; const FeedCardGallery = ({ images = [] }) => { - if (images.length === 0) return <>; + const filteredImages = images.filter((url) => isImage(url) || isVideo(url)); + if (filteredImages.length === 0) return <>; return (
-
- {images.slice(0, 3).map((url, index) => +
+ {filteredImages.slice(0, 3).map((url, index) => isImage(url) ? ( {`${index ) : isVideo(url) ? ( @@ -19,9 +19,9 @@ const FeedCardGallery = ({ images = [] }) => { <>Unknown Data ) )} - {images.length >= 4 && ( + {filteredImages.length >= 4 && (
- {images.length > 5 && +{images.length - 4}} + {filteredImages.length > 5 && +{images.length - 4}} {`4`}
)}