From d4bd801980ddffa3e8dcc16fdc4286b4c6b2dac1 Mon Sep 17 00:00:00 2001 From: Przemek Wiech Date: Mon, 20 Jan 2020 19:34:20 +0100 Subject: [PATCH] When showing data from WikiTree, don't show "all relatives" chart option --- src/app.tsx | 5 +++++ src/top_bar.tsx | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 8ff04ee..9d1d46f 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -97,6 +97,8 @@ interface State { chartType: ChartType; /** Whether to show the error popup. */ showErrorPopup: boolean; + /** True if data is loaded from WikiTree. */ + wikiTreeSource: boolean; } export class App extends React.Component { @@ -106,6 +108,7 @@ export class App extends React.Component { standalone: true, chartType: ChartType.Hourglass, showErrorPopup: false, + wikiTreeSource: false, }; chartRef: Chart | null = null; @@ -291,6 +294,7 @@ export class App extends React.Component { showSidePanel, standalone, chartType, + wikiTreeSource: source === 'wikitree', }), ); } catch (error) { @@ -427,6 +431,7 @@ export class App extends React.Component { - this.changeView('relatives')}> - - - + {this.props.allowAllRelativesChart ? ( + this.changeView('relatives')}> + + + + ) : null} this.changeView('fancy')}>