Skip to content

Commit

Permalink
fix: copy url to proposal comment (#957)
Browse files Browse the repository at this point in the history
* test setup for reproducing #956

* fix copy url by switching to devhub commentsandlogs and also checking which instance account that is currently active

* fix issue for events committee

* fix so copy url for proposal goes to web4 page

* handle that devhub portal repo changed name

* handle that comments are not in iframe anymore
repository name changed back to neardevhub-bos

* add test for clicking like on a proposal comment
  • Loading branch information
petersalomonsen authored Oct 13, 2024
1 parent fb86c78 commit 229e7f5
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 1,078 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ replacements.*.json.tmp
test-results

replacements.analytics.sh
*.mp4
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { getLinkUsingCurrentGateway } = VM.require(
) || { getLinkUsingCurrentGateway: () => {} };
const snapshotHistory = props.snapshotHistory;
const proposalId = props.id;
const instanceAccount = props.item.path.split("/")[0];

const Wrapper = styled.div`
position: relative;
Expand Down Expand Up @@ -169,7 +170,7 @@ const Comment = ({ commentItem }) => {
blockHeight,
};
const content = JSON.parse(Social.get(item.path, blockHeight) ?? "null");
const link = `https://${REPL_DEVHUB}.page/proposal/${proposalId}?accountId=${accountId}&blockHeight=${blockHeight}`;
const link = `https://${instanceAccount}.page/proposal/${proposalId}?accountId=${accountId}&blockHeight=${blockHeight}`;
const hightlightComment =
parseInt(props.blockHeight ?? "") === blockHeight &&
props.accountId === accountId;
Expand Down
Loading

0 comments on commit 229e7f5

Please sign in to comment.