Skip to content

Commit

Permalink
fix: filter domains not expired
Browse files Browse the repository at this point in the history
  • Loading branch information
irisdv committed Jul 18, 2024
1 parent 1cc32b9 commit 31b1282
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hooks/getRemainingClicks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export default function getRemainingClicks(
const now = Date.now();
console.log("availableIds", availableIds);
console.log("now", now);
const domains = availableIds.full_ids.map((fullId: FullId) => {
if (
fullId.domain &&
fullId.domain_expiry &&
fullId.domain_expiry * 1000 > now
const domains = availableIds.full_ids
.filter(
(fullId: FullId) =>
fullId.domain &&
fullId.domain_expiry &&
fullId.domain_expiry * 1000 > now
)
return fullId.domain;
});
.map((fullId: FullId) => fullId.domain);
console.log("domains", domains);

const domainStatus = await getDomainClaimedStatus(domains);
Expand Down

0 comments on commit 31b1282

Please sign in to comment.