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

Add Contest Page #17

Merged
merged 14 commits into from
Apr 12, 2021
Merged

Add Contest Page #17

merged 14 commits into from
Apr 12, 2021

Conversation

wdsrocha
Copy link
Owner

@wdsrocha wdsrocha commented Apr 4, 2021

Only with the contest header and the problem list, for now.

Manual testing: https://dojo-pffemfdgj-wdsrocha.vercel.app/contest/1

@wdsrocha wdsrocha self-assigned this Apr 4, 2021
@vercel
Copy link

vercel bot commented Apr 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/wdsrocha/dojo/2ZpBm4AYS87HgjpXgBBdNpQdsGhT
✅ Preview: Failed

[Deployment for 8365cf7 failed]

@wdsrocha
Copy link
Owner Author

For some reason, the CI build keeps failing with the following error:

07:34:31.673 | Failed to compile.
07:34:31.673 | ./components/ContestHeader.tsx:20:25
07:34:31.673 | Type error: Property 'format' does not exist on type 'Duration'.
07:34:31.673 |   18 |   if (days > 1) return `${days} dias`;
07:34:31.673 |   19 |   if (days === 1) return `${Math.floor(timeDifference.asHours())} horas`;
07:34:31.673 | > 20 |   return timeDifference.format("HH:mm:ss");
07:34:31.674 |      |                        ^
07:34:31.674 |   21 | };
07:34:31.674 |   22 |
07:34:31.674 |   23 | type ContestHeaderProps = Pick<Contest, "startDate" | "endDate" | "title">;
07:34:31.752 | error Command failed with exit code 1.
07:34:31.752 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
07:34:31.771 | Error: Command "yarn build" exited with 1

On package.json, dayjs is ^1.8.30 and the Duration plugin came out on 1.8.24, I wonder if the correct version is being installed. Maybe the .extend is being called in the wrong place, so the plugin gets tree shaken before? Who knows.

Managed to deploy this anyway with vercel CLI (vercel deploy --prod), so I'll merge for now.

@wdsrocha wdsrocha marked this pull request as ready for review April 12, 2021 11:56
@wdsrocha wdsrocha merged commit e0f1f41 into main Apr 12, 2021
@wdsrocha wdsrocha deleted the contest-front branch April 12, 2021 11:56
@wdsrocha
Copy link
Owner Author

Maybe Duration only works browser side? To check: https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr

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.

1 participant