graph: handle already joined case

This commit is contained in:
Liam Fitzgerald 2020-09-25 10:37:32 +10:00
parent c373d57d23
commit 6af438f1f1
2 changed files with 7 additions and 2 deletions

View File

@ -120,7 +120,8 @@ export default function index(associations, apps) {
} else {
const obj = result(
title,
`/~${each['app-name']}/join${each['app-path']}`,
`/~${each['app-name']}/join${each['app-path']}${
(each.metadata.module && '/' + each.metadata.module) || ''}`,
app.charAt(0).toUpperCase() + app.slice(1),
(associations?.contacts?.[each['group-path']]?.metadata?.title || null)
);

View File

@ -44,8 +44,12 @@ export default class GraphApp extends PureComponent {
setTimeout(autoJoin, 2000);
}
};
autoJoin();
if(!graphKeys.has(resource)) {
autoJoin();
} else if(props.match.params.module) {
props.history.push(`/~${props.match.params.module}/${resource}`);
}
return (
<Center width="100%" height="100%">
<Text fontSize={1}>Redirecting...</Text>