mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 02:11:38 +03:00
interface: redirect to base url when unsubscribing, removing, or archiving
This commit is contained in:
parent
2cd05661eb
commit
c0ed4169fd
@ -43,13 +43,16 @@ export function ChannelPopoverRoutes(props: ChannelPopoverRoutesProps) {
|
|||||||
const handleUnsubscribe = async () => {
|
const handleUnsubscribe = async () => {
|
||||||
const [,,ship,name] = association.resource.split('/');
|
const [,,ship,name] = association.resource.split('/');
|
||||||
await api.graph.leaveGraph(ship, name);
|
await api.graph.leaveGraph(ship, name);
|
||||||
|
history.push(props.baseUrl);
|
||||||
};
|
};
|
||||||
const handleRemove = async () => {
|
const handleRemove = async () => {
|
||||||
await api.metadata.remove('graph', association.resource, association.group);
|
await api.metadata.remove('graph', association.resource, association.group);
|
||||||
|
history.push(props.baseUrl);
|
||||||
};
|
};
|
||||||
const handleArchive = async () => {
|
const handleArchive = async () => {
|
||||||
const [,,,name] = association.resource.split('/');
|
const [,,,name] = association.resource.split('/');
|
||||||
await api.graph.deleteGraph(name);
|
await api.graph.deleteGraph(name);
|
||||||
|
history.push(props.baseUrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
const canAdmin = isChannelAdmin(group, association.resource);
|
const canAdmin = isChannelAdmin(group, association.resource);
|
||||||
|
Loading…
Reference in New Issue
Block a user