From 3e91773cd94162fca1855638a76d7bd2f510558a Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Thu, 21 Dec 2017 17:28:06 +0100
Subject: Add sectionName prefix to all anchor links in order to fix method
 name collisions between sections

---
 packages/website/ts/pages/documentation/event_definition.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'packages/website/ts/pages/documentation/event_definition.tsx')

diff --git a/packages/website/ts/pages/documentation/event_definition.tsx b/packages/website/ts/pages/documentation/event_definition.tsx
index 695debf5b..71ec56aac 100644
--- a/packages/website/ts/pages/documentation/event_definition.tsx
+++ b/packages/website/ts/pages/documentation/event_definition.tsx
@@ -8,6 +8,7 @@ import {colors} from 'ts/utils/colors';
 
 interface EventDefinitionProps {
     event: Event;
+    sectionName: string;
     docsInfo: DocsInfo;
 }
 
@@ -26,7 +27,7 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event
         const event = this.props.event;
         return (
             <div
-                id={event.name}
+                id={`${this.props.sectionName}-${event.name}`}
                 className="pb2"
                 style={{overflow: 'hidden', width: '100%'}}
                 onMouseOver={this.setAnchorVisibility.bind(this, true)}
@@ -54,6 +55,7 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event
             const type = (
                 <Type
                     type={eventArg.type}
+                    sectionName={this.props.sectionName}
                     docsInfo={this.props.docsInfo}
                 />
             );
-- 
cgit 

