-
Notifications
You must be signed in to change notification settings - Fork 8
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
Flatten the URL list to generate valid links #101
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/ooni/run/C7VE66caRcgxNFFM92GzgG8Xeh1A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐳
If it's not too long and tedious, I'd also probably add a test that verifies that we don't break this again, otherwise this PR is good to merge for me, thank you!
(If writing a test turns out to be indeed a long task, I think we should probably discuss about making this repository easier to test as part of a separate conversation.)
@@ -56,7 +56,7 @@ const TwitterButton = ({ universalLink }) => { | |||
return ( | |||
<TwitterShareButton | |||
url={universalLink} | |||
message={intl.formatMessage({id: 'Share.Twitter.Tweet', defaultMessage: 'Run OONI Probe to test for censorship!'})} | |||
message={intl.formatMessage({ id: 'Share.Twitter.Tweet', defaultMessage: 'Run OONI Probe to test for censorship!' })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like my editor has done some automatic reformatting of several blocks. Most changes can be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -72,7 +72,7 @@ const Home = () => { | |||
|
|||
const [universalLink, embedCode] = useMemo(() => { | |||
console.log('generating links and embed code') | |||
const universalLink = getUniversalLink([...urls]) | |||
const universalLink = getUniversalLink(urls.map((e) => e.url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only relevant change is this line here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Unfortunately we don't currently have any testing infrastructure in place in this repo. Adding a test for it basically involves adding all the boilerplate needed to get it working in the repo. I agree it's a good idea, but it's a larger task that I suggest we do as future work: #102 |
Fixes: #100