Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update banner for vote #215

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/components/common/ProgressTracker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@

const getRegisteredPercentage = useCallback(
() => (humansRegistered / ProgressMeterMax) * 100,
[humansRegistered]

Check warning on line 47 in src/components/common/ProgressTracker.jsx

View workflow job for this annotation

GitHub Actions / Lint and Format code

React Hook useCallback has a missing dependency: 'ProgressMeterMax'. Either include it or remove the dependency array
);

// to make sure the the right corner is not clipped much with increasing width
function getClipPercentage() {

Check warning on line 51 in src/components/common/ProgressTracker.jsx

View workflow job for this annotation

GitHub Actions / Lint and Format code

'getClipPercentage' is defined but never used. Allowed unused vars must match /_/u
const registeredPercentage = getRegisteredPercentage();
if (registeredPercentage < 15) {
return 25;
Expand Down Expand Up @@ -101,7 +101,7 @@
const interval = setInterval(updateCountdown, 1000);

return () => clearInterval(interval);
}, []);

Check warning on line 104 in src/components/common/ProgressTracker.jsx

View workflow job for this annotation

GitHub Actions / Lint and Format code

React Hook useEffect has missing dependencies: 'updateCountdown' and 'userTimezone'. Either include them or remove the dependency array

const NumberContainer = ({ number, text }) => {
return (
Expand All @@ -118,7 +118,7 @@
return (
<div className="text-center text-md">
<>
<div className="bg-purple-400 h-[45px] md:h-[40px] relative">
{/* <div className="bg-purple-400 h-[45px] md:h-[40px] relative">
<div
className="bg-yellow-400 absolute left-0 top-0 h-full"
style={{
Expand All @@ -135,7 +135,7 @@
Vote Now
</button>
</h2>
</div>
</div> */}
<div className="p-2 w-full bg-gradient-to-r from-purple-600 to-indigo-600">
{fvToken ? (
<div className="flex justify-center gap-5 items-center">
Expand All @@ -161,14 +161,9 @@
</p>
<button
className="bg-yellow-300 rounded-lg py-1.5 px-2 text-sm"
onClick={() =>
window.open(
'https://pages.near.org/blog/ndc-v1-governance-elections-faq/',
'_blank'
)
}
onClick={() => window.open(Links.ELECTIONS, '_blank')}
>
Learn More
Vote Now
</button>
</div>
)}
Expand Down
Loading