Allow uploading images together with the GEDCOM file.

This commit is contained in:
Przemek Wiech
2019-03-12 19:30:20 +01:00
parent f75eee4e82
commit 61d4f43357
4 changed files with 99 additions and 20 deletions

View File

@@ -59,6 +59,8 @@ export class App extends React.Component<RouteComponentProps, {}> {
return;
}
const gedcom = this.props.location.state && this.props.location.state.data;
const images =
this.props.location.state && this.props.location.state.images;
const search = queryString.parse(this.props.location.search);
const getParam = (name: string) => {
const value = search[name];
@@ -76,7 +78,7 @@ export class App extends React.Component<RouteComponentProps, {}> {
this.props.history.replace({pathname: '/'});
} else if (this.isNewData(hash, url)) {
const loadedData = hash
? loadGedcom(hash, gedcom)
? loadGedcom(hash, gedcom, images)
: loadFromUrl(url!, handleCors);
loadedData.then(
(data) => {