Added WikiTree login button

This commit is contained in:
Przemek Wiech
2020-02-02 00:11:14 +01:00
parent 0993af760d
commit 8e33f92a04
6 changed files with 229 additions and 61 deletions

View File

@@ -247,6 +247,7 @@ export class App extends React.Component<RouteComponentProps, {}> {
const standalone = getParam('standalone') !== 'false'; // True by default.
const view = getParam('view');
const source = getParam('source');
const authcode = getParam('?authcode');
const chartTypes = new Map<string | undefined, ChartType>([
['relatives', ChartType.Relatives],
@@ -278,7 +279,7 @@ export class App extends React.Component<RouteComponentProps, {}> {
);
const data =
source === 'wikitree'
? await loadWikiTree(indi!)
? await loadWikiTree(indi!, authcode)
: hash
? await loadGedcom(hash, gedcom, images)
: await loadFromUrl(url!, handleCors);
@@ -485,6 +486,7 @@ export class App extends React.Component<RouteComponentProps, {}> {
onDownloadPng: this.onDownloadPng,
onDownloadSvg: this.onDownloadSvg,
}}
showWikiTreeLogin={this.state.wikiTreeSource}
/>
)}
/>