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

Bug Fix: Countdown timer UI (#199) #200

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion src/components/common/ProgressTracker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

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

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
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

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 Down Expand Up @@ -169,7 +169,11 @@
</div>
</>
{/* to not show any countdown from 1 sept to 7 sept */}
{!electionStarted && countdown.days === 0 ? null : (
{!electionStarted &&
countdown.days === 0 &&
countdown.hours === 0 &&
countdown.minutes === 0 &&
countdown.seconds === 0 ? null : (
<div
style={{ backgroundColor: '#F29BC0' }}
className="p-2 text-white font-semibold flex gap-x-8 justify-center items-center"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ const Home = () => {
<PrimaryButton
onClick={() =>
window.open(
'https://docs.google.com/forms/d/e/1FAIpQLSfa3S6Qz1MdiJEXINMICv9O9oVD7LOdwiPmHI_4_gCLAhN0CA/viewform',
'https://airtable.com/appgHJzUuw1Kb2GJV/shrCdvjmWMzwaMEj8',
'_blank'
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function getConfig() {
case 'dev':
return {
network_id: 'testnet',
app_contract: 'registry-unstable.i-am-human.testnet',
app_contract: 'registry-1.i-am-human.testnet',
og_contract: 'community-v1.i-am-human.testnet',
// gooddollar_contract: 'gooddollar-v1.i-am-human.testnet',
// fractal_contract: 'fractal-1.i-am-human.testnet', // for DEV ENV
Expand Down
Loading