Making Share Target functional

This commit is contained in:
Fabian
2019-06-03 16:51:11 +02:00
parent 7917a628ef
commit 31d9f99b77
13 changed files with 114 additions and 88 deletions

View File

@ -6,7 +6,7 @@ import Navigation from "../../../navigation";
export default class SharePage extends Page<{ state: any }, { vault: string }> {
text: string;
componentWillMount() {
let { title, text, url } = Navigation.getQuery() || {} as any;
let { title, text, url } = this.props.state;
let note = "";
if (title) {
note += title + "\n"
@ -24,7 +24,9 @@ export default class SharePage extends Page<{ state: any }, { vault: string }> {
render() {
return <VaultsPage state={undefined} selectVault onSelected={vault => {
Navigation.setPage("/vault", { id: vault }, { entry: "true", note: this.text }, true);
Navigation.setPage("/", undefined, undefined, true);
Navigation.setPage("/vault", { id: vault });
Navigation.setPage("/vault", { id: vault }, { entry: "true", note: this.text });
}} />
}
}