aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-01 16:18:46 +0800
committerFabio Berger <me@fabioberger.com>2018-03-01 16:18:46 +0800
commit5908f189a7fc060f2fa53cc41cdc991eff78a362 (patch)
treedb23efb08215c38628d0895481bd847c47f20d0b /packages/website
parente25cc301fddbc67f793ca0eb0f7635cdb9147a71 (diff)
downloaddexon-sol-tools-5908f189a7fc060f2fa53cc41cdc991eff78a362.tar
dexon-sol-tools-5908f189a7fc060f2fa53cc41cdc991eff78a362.tar.gz
dexon-sol-tools-5908f189a7fc060f2fa53cc41cdc991eff78a362.tar.bz2
dexon-sol-tools-5908f189a7fc060f2fa53cc41cdc991eff78a362.tar.lz
dexon-sol-tools-5908f189a7fc060f2fa53cc41cdc991eff78a362.tar.xz
dexon-sol-tools-5908f189a7fc060f2fa53cc41cdc991eff78a362.tar.zst
dexon-sol-tools-5908f189a7fc060f2fa53cc41cdc991eff78a362.zip
Fix bug where contract event anchor ids were incorrect
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/pages/documentation/event_definition.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/website/ts/pages/documentation/event_definition.tsx b/packages/website/ts/pages/documentation/event_definition.tsx
index 0e53e38e7..e62c9ecbd 100644
--- a/packages/website/ts/pages/documentation/event_definition.tsx
+++ b/packages/website/ts/pages/documentation/event_definition.tsx
@@ -25,9 +25,10 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event
}
public render() {
const event = this.props.event;
+ const id = `${this.props.sectionName}-${event.name}`;
return (
<div
- id={`${this.props.sectionName}-${event.name}`}
+ id={id}
className="pb2"
style={{ overflow: 'hidden', width: '100%' }}
onMouseOver={this._setAnchorVisibility.bind(this, true)}
@@ -36,7 +37,7 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event
<AnchorTitle
headerSize={HeaderSizes.H3}
title={`Event ${event.name}`}
- id={event.name}
+ id={id}
shouldShowAnchor={this.state.shouldShowAnchor}
/>
<div style={{ fontSize: 16 }}>