From 3472bdcfd4ea0a6145dd68972f563e483baf7e6b Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Tue, 28 Nov 2017 11:16:35 -0600
Subject: Refactor docs to be more declarative, put all hard-coded doc-related
 data in one place so it easier to add new doc pages

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

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

diff --git a/packages/website/ts/pages/documentation/method_block.tsx b/packages/website/ts/pages/documentation/method_block.tsx
index 026c46918..3f4eb7164 100644
--- a/packages/website/ts/pages/documentation/method_block.tsx
+++ b/packages/website/ts/pages/documentation/method_block.tsx
@@ -4,6 +4,7 @@ import {colors} from 'material-ui/styles';
 import * as React from 'react';
 import * as ReactMarkdown from 'react-markdown';
 import {Comment} from 'ts/pages/documentation/comment';
+import {DocsInfo} from 'ts/pages/documentation/docs_info';
 import {MethodSignature} from 'ts/pages/documentation/method_signature';
 import {SourceLink} from 'ts/pages/documentation/source_link';
 import {AnchorTitle} from 'ts/pages/shared/anchor_title';
@@ -23,6 +24,7 @@ interface MethodBlockProps {
     method: SolidityMethod|TypescriptMethod;
     libraryVersion: string;
     typeDefinitionByName: TypeDefinitionByName;
+    docsInfo: DocsInfo;
 }
 
 interface MethodBlockState {
@@ -85,12 +87,14 @@ export class MethodBlock extends React.Component<MethodBlockProps, MethodBlockSt
                     <MethodSignature
                         method={method}
                         typeDefinitionByName={this.props.typeDefinitionByName}
+                        docsInfo={this.props.docsInfo}
                     />
                 </code>
                 {(method as TypescriptMethod).source &&
                     <SourceLink
                         version={this.props.libraryVersion}
                         source={(method as TypescriptMethod).source}
+                        baseUrl={this.props.docsInfo.packageUrl}
                     />
                 }
                 {method.comment &&
-- 
cgit v1.2.3

