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

Fix hcap detail #212

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Fix hcap detail #212

merged 2 commits into from
Oct 3, 2024

Conversation

dholms
Copy link
Contributor

@dholms dholms commented Oct 3, 2024

Hcap details were changed from a record format ({[property]: value}) to an array format ({property, value}[]).

@@ -534,7 +534,7 @@ function Details({
)}
{hcapDetail && (
<DataField value={ip} label="Hcaptcha">
{Object.entries(hcapDetail).map(([property, value]) => (
{hcapDetail.map(({ property, value }) => (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.map will fail if hcapDetail undefined so you can either fallback to [] up top or just ?. here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah good looks 👍

const hcapDetail = Array.isArray(repo.hcaptchaDetails)
? (repo.hcaptchaDetails as { property: string; value: string }[])
: undefined
console.log(hcapDetail)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix the console.log and we're good!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops 🤦

@arcalinea arcalinea temporarily deployed to fix-hcap-detail - ozone-staging PR #212 October 3, 2024 20:08 — with Render Destroyed
@dholms dholms merged commit 0588989 into main Oct 3, 2024
3 checks passed
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.

3 participants