diff --git a/src/components/AltTextRating/AltTextRatingTool.js b/src/components/AltTextRating/AltTextRatingTool.js
index 80d64b5..a97b18b 100644
--- a/src/components/AltTextRating/AltTextRatingTool.js
+++ b/src/components/AltTextRating/AltTextRatingTool.js
@@ -260,7 +260,11 @@ const AltTextRatingTool = () => {
{analysisResult.postsWithImages} contain images
{analysisResult.repliesWithImages} are replies
{analysisResult.postsWithAltText} posts have alt text
- Score: {analysisResult.altTextPercentage.toFixed(2)}% {analysisResult.emoji}
+ {analysisResult.postsWithImages > 0 ? (
+ Score: {analysisResult.altTextPercentage.toFixed(2)}% {analysisResult.emoji}
+ ) : (
+ No images found!
+ )}
);
diff --git a/src/components/Navbar/Navbar.css b/src/components/Navbar/Navbar.css
index 8cc8e6c..2729789 100644
--- a/src/components/Navbar/Navbar.css
+++ b/src/components/Navbar/Navbar.css
@@ -243,6 +243,7 @@
align-content: center;
justify-content: center;
gap: 4px;
+ margin-top: 3.5px;
}
.beta-badge {
diff --git a/src/components/UserProfile/components/AltTextCard.js b/src/components/UserProfile/components/AltTextCard.js
index de7c84e..f30b0d5 100644
--- a/src/components/UserProfile/components/AltTextCard.js
+++ b/src/components/UserProfile/components/AltTextCard.js
@@ -21,16 +21,6 @@ const AltTextCard = () => {
imagePostsReplies,
} = postStats;
- // If there are no images, display the "No images found!" message
- if (postsWithImages === 0) {
- return (
-
-
No images found!
-
Last 90 Days
-
- );
- }
-
// Calculate emoji based on percentage
let emoji = emojis[0];
if (altTextPercentage >= 0.75) {
@@ -70,39 +60,49 @@ const AltTextCard = () => {
{imagePostsAltText} posts have alt text
-
-
- {(altTextPercentage * 100).toFixed(0)}% {emoji}
-
-
- Last 90 Days
+ {postsWithImages > 0 ? (
+ <>
+
+
+ {(altTextPercentage * 100).toFixed(0)}% {emoji}
+
+
+ Last 90 Days
+ >
+ ) : (
+
+ No images found!
+
+ )}
-
-
-
- value ? `${value}` : ''
- }}
- background={{ fill: '#eee' }}
- clockWise
- dataKey="images"
- />
-
-
-
+ {postsWithImages > 0 && (
+
+
+
+ value ? `${value}` : ''
+ }}
+ background={{ fill: '#eee' }}
+ clockWise
+ dataKey="images"
+ />
+
+
+
+ )}
);
};