aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-28 00:25:53 +0800
committerFabio Berger <me@fabioberger.com>2017-11-28 00:25:53 +0800
commit25ec4cf7b04bc58cf192566ea680d426dba2bff1 (patch)
tree1ef1a72bfb96e81f037b439c2efbfdcf12635cb1 /packages/website/ts
parent48b3d8526560d389e74beb12bbd64b7be6e9268f (diff)
downloaddexon-sol-tools-25ec4cf7b04bc58cf192566ea680d426dba2bff1.tar.gz
dexon-sol-tools-25ec4cf7b04bc58cf192566ea680d426dba2bff1.tar.zst
dexon-sol-tools-25ec4cf7b04bc58cf192566ea680d426dba2bff1.zip
Fix source links in 0x.js docs
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/pages/documentation/source_link.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/website/ts/pages/documentation/source_link.tsx b/packages/website/ts/pages/documentation/source_link.tsx
index 2fb69e2f0..08d372743 100644
--- a/packages/website/ts/pages/documentation/source_link.tsx
+++ b/packages/website/ts/pages/documentation/source_link.tsx
@@ -8,10 +8,13 @@ interface SourceLinkProps {
version: string;
}
+const SUB_PKG = '0x.js';
+
export function SourceLink(props: SourceLinkProps) {
- const source = props.source;
- const githubUrl = constants.GITHUB_0X_JS_URL;
- const sourceCodeUrl = `${githubUrl}/blob/v${props.version}/${source.fileName}#L${source.line}`;
+ const src = props.source;
+ const url = constants.GITHUB_0X_JS_URL;
+ // https://github.com/0xProject/0x.js/blob/0x.js%400.26.1/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
+ const sourceCodeUrl = `${url}/blob/${SUB_PKG}%40${props.version}/packages/${SUB_PKG}/${src.fileName}#L${src.line}`;
return (
<div className="pt2" style={{fontSize: 14}}>
<a