link fe: navigate to collection post-create

This commit is contained in:
Fang 2020-03-03 16:26:42 +01:00
parent 950023e448
commit a72c74d74d
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 7 additions and 7 deletions

View File

@ -29,9 +29,9 @@ export class NewScreen extends Component {
const { props, state } = this;
if (prevProps !== props) {
let station = `/~${window.ship}/${state.idName}`;
if (station in props.resources) {
console.log('TODO nav', '/~chat/room' + station);
let target = `/${state.idName}`;
if (target in props.resources) {
props.history.push(`/~link/list/0${target}`);
}
}
}
@ -134,7 +134,7 @@ export class NewScreen extends Component {
);
submit.then(() => {
api.setSpinner(false);
console.log('TODO nav', `/~link/list/0${appPath}`);
props.history.push(`/~link/list/0${appPath}`);
})
});
}

View File

@ -32,10 +32,8 @@ export class Root extends Component {
let comments = !!state.comments ? state.comments : {};
const seen = !!state.seen ? state.seen : {};
//TODO update /join/resource route in contacts
const invites = '/link' in state.invites ?
state.invites['/link'] : {};
console.log('invites', invites);
return (
<BrowserRouter>
@ -76,7 +74,9 @@ export class Root extends Component {
<NewScreen
resources={resources}
groups={groups}
contacts={contacts}/>
contacts={contacts}
{...props}
/>
</Skeleton>
);
}}/>