-
Notifications
You must be signed in to change notification settings - Fork 0
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/proposal links #23
base: v2
Are you sure you want to change the base?
Conversation
cf497b1
to
3871df3
Compare
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.
Why were the links broken?
How does this PR fix them?
Remember to update the version number in package.json.
} | ||
link.setAttribute( | ||
'onClick', | ||
'{ ' + |
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.
Factor out into a function taking stringified id as a parameter
|
||
useEffect(() => { | ||
// // Function to perform search and replace within the iframe | ||
const performSearchAndReplace = async () => { |
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.
This function is too complex in my opinion, and needs refactoring to make it smaller and easier to read.
3871df3
to
6171b1c
Compare
Fix broken links on dao proposals.
PIP-33 links are wrapped in a google search link and are not modifiable. When clicking the link the google search generates a redirectory that the browser blocks for security reasons. The output looks like:
This fix aim is to modify the contain of the iframe in which the proposal is loaded and intecept all links click to check that the document loads only direct links.