diff --git a/package-lock.json b/package-lock.json index 48963f0..91fc14b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,8 @@ "@tremor/react": "^3.13.4", "next": "14.1.0", "react": "^18", - "react-dom": "^18" + "react-dom": "^18", + "react-rough-notation": "^1.0.5" }, "devDependencies": { "@tailwindcss/forms": "^0.5.7", @@ -1747,6 +1748,18 @@ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, + "node_modules/react-rough-notation": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/react-rough-notation/-/react-rough-notation-1.0.5.tgz", + "integrity": "sha512-TTDnw1Qn96PwitGsBsjNh4911+o26Vivj/dhHbsHHhN6lDgkQsFhv1X/eOnCjHA2EOyDE5JBQ1HEZ1yW8sCmKA==", + "dependencies": { + "rough-notation": "^0.5.1" + }, + "peerDependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + } + }, "node_modules/react-smooth": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-2.0.5.tgz", @@ -1865,6 +1878,11 @@ "node": ">=0.10.0" } }, + "node_modules/rough-notation": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/rough-notation/-/rough-notation-0.5.1.tgz", + "integrity": "sha512-ITHofTzm13cWFVfoGsh/4c/k2Mg8geKgBCwex71UZLnNuw403tCRjYPQ68jSAd37DMbZIePXPjDgY0XdZi9HPw==" + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", diff --git a/package.json b/package.json index b78f912..d311644 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "@tremor/react": "^3.13.4", "next": "14.1.0", "react": "^18", - "react-dom": "^18" + "react-dom": "^18", + "react-rough-notation": "^1.0.5" }, "devDependencies": { "@tailwindcss/forms": "^0.5.7", diff --git a/src/Components/FollowerAnalysis/FollowerProgress.tsx b/src/Components/FollowerAnalysis/FollowerProgress.tsx index 9f78e97..8f63eaf 100644 --- a/src/Components/FollowerAnalysis/FollowerProgress.tsx +++ b/src/Components/FollowerAnalysis/FollowerProgress.tsx @@ -1,45 +1,66 @@ -import React from "react"; +import React, { useState } from "react"; import { Card, Flex, ProgressCircle, BadgeDelta, } from "@tremor/react"; -import {FollowerAnalysis} from "@/Interface/api.interface"; +import { RoughNotation } from "react-rough-notation"; +import { FollowerAnalysis } from "@/Interface/api.interface"; const FollowerProgress: React.FC = ({ followerCount, increaseOrDecrease, }) => { - console.log(followerCount); + const [show, setShow] = useState(true); + + + return ( - -

Followers

- - {followerCount} - {increaseOrDecrease === "no_change" ? ( - No Change - ) : ( - +
+ +
+ {show && ( // Conditional rendering based on show state + +

Followers

+
+ )} +
+ + - Increase -
- )} -
-
+ {followerCount} + + {increaseOrDecrease === "no_change" ? ( + + No Change + + ) : ( + + Increase + + )} + + + ); }; diff --git a/src/Components/FollowerAnalysis/FollowingProgress.tsx b/src/Components/FollowerAnalysis/FollowingProgress.tsx index 0d20821..80a413f 100644 --- a/src/Components/FollowerAnalysis/FollowingProgress.tsx +++ b/src/Components/FollowerAnalysis/FollowingProgress.tsx @@ -1,20 +1,29 @@ -import React from "react"; +import React , {useState} from "react"; import { Card, Flex, ProgressCircle, BadgeDelta, } from "@tremor/react"; +import { RoughNotation } from "react-rough-notation"; import {FollowingAnalysis} from "@/Interface/api.interface"; const FollowingProgress: React.FC = ({ followingCount, increaseOrDecrease, }) => { - + const [show, setShow] = useState(true); // Define and initialize the state variable return ( - -

Following

+
+
+ +
+ {show && ( + +

Followers

+
+ )} +
= ({ )}
+
); }; diff --git a/src/Components/LanguageAnalysis/LanguageCount.tsx b/src/Components/LanguageAnalysis/LanguageCount.tsx index 071daec..053be78 100644 --- a/src/Components/LanguageAnalysis/LanguageCount.tsx +++ b/src/Components/LanguageAnalysis/LanguageCount.tsx @@ -13,6 +13,8 @@ const LanguageCount: React.FC = ({ languageCounts }) => { })); return ( +
+
= ({ languageCounts }) => { yAxisWidth={56} /> +
); }; diff --git a/src/Styles/Dashboard/followerProgress.css b/src/Styles/Dashboard/followerProgress.css index 71a3d41..08b4b06 100644 --- a/src/Styles/Dashboard/followerProgress.css +++ b/src/Styles/Dashboard/followerProgress.css @@ -12,11 +12,12 @@ } + .followerCardTitle { font-size: 15px; font-weight: bolder; margin-top: 0; - color: black; + color: white; } .followerProgressCircle { @@ -37,5 +38,9 @@ border-radius: 50px; z-index: 1; } + .bb{ + margin-left: 10%; + border-radius: 30px; + } \ No newline at end of file diff --git a/src/Styles/Dashboard/langCount.css b/src/Styles/Dashboard/langCount.css new file mode 100644 index 0000000..7b6b832 --- /dev/null +++ b/src/Styles/Dashboard/langCount.css @@ -0,0 +1,3 @@ +.langGradientBack{ + border-radius: 30px; +} \ No newline at end of file diff --git a/src/app/Dashboard/page.tsx b/src/app/Dashboard/page.tsx index c7a8d17..e4c7e7e 100644 --- a/src/app/Dashboard/page.tsx +++ b/src/app/Dashboard/page.tsx @@ -70,7 +70,7 @@ return followerAnlData.followerCount !== 0 && followingAnlData.followingCount !=
- +