mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
Merge pull request #4412 from urbit/la/fix-385
interface: redirect to base url when unsubscribing, removing, or arch…
This commit is contained in:
commit
7176577d13
@ -43,13 +43,16 @@ export function ChannelPopoverRoutes(props: ChannelPopoverRoutesProps) {
|
||||
const handleUnsubscribe = async () => {
|
||||
const [,,ship,name] = association.resource.split('/');
|
||||
await api.graph.leaveGraph(ship, name);
|
||||
history.push(props.rootUrl);
|
||||
};
|
||||
const handleRemove = async () => {
|
||||
await api.metadata.remove('graph', association.resource, association.group);
|
||||
history.push(props.rootUrl);
|
||||
};
|
||||
const handleArchive = async () => {
|
||||
const [,,,name] = association.resource.split('/');
|
||||
await api.graph.deleteGraph(name);
|
||||
history.push(props.baseUrl);
|
||||
};
|
||||
|
||||
const canAdmin = isChannelAdmin(group, association.resource);
|
||||
|
@ -33,7 +33,6 @@ export function Resource(props: ResourceProps) {
|
||||
const rid = association.resource;
|
||||
const selectedGroup = association.group;
|
||||
const relativePath = (p: string) =>
|
||||
|
||||
`${props.baseUrl}/resource/${app}${rid}${p}`;
|
||||
const skelProps = { api, association, groups, contacts };
|
||||
let title = props.association.metadata.title;
|
||||
@ -71,6 +70,7 @@ export function Resource(props: ResourceProps) {
|
||||
contacts={props.contacts}
|
||||
api={props.api}
|
||||
baseUrl={relativePath("")}
|
||||
rootUrl={props.baseUrl}
|
||||
notificationsGraphConfig={notificationsGraphConfig}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user