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

Improve date readability #236

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Olaleye-Blessing
Copy link

Closes: #227

Screenshots:

Screenshot 2025-02-12 at 14 54 19

Note:

The type here is moved to Success because of the checks done in the parent component.

function UserHasVoted({ cycleDates }: { cycleDates: CycleDatesSuccess }) {

The parent has these checks already which means the component will only be rendered if it's in the success state. Check lines 174 to 202 in the GovernancePage.tsx

if (
    castVote.status === "ERROR" ||
    currentVotingDistribution.status === "ERROR" ||
    cycleDates.status === "ERROR" ||
    cycleLength.status === "ERROR"
  )
    return (
      <div className="w-full flex flex-col items-center pt-32">
        <h1>Please wait...</h1>
        <div className="mt-6 size-10 text-breadgray-grey">
          <Spinner />
        </div>
      </div>
    );

  if (
    !voteFormState ||
    castVote.status === "LOADING" ||
    currentVotingDistribution.status === "LOADING" ||
    cycleDates.status === "LOADING" ||
    cycleLength.status === "LOADING"
  )
    return (
      <div className="w-full flex justify-center pt-32">
        <div className="size-10 text-breadgray-grey">
          <Spinner />
        </div>
      </div>
    );

Copy link

netlify bot commented Feb 12, 2025

👷 Deploy request for dapper-sundae-ae0873 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0f24c8a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update date formatting
1 participant