mirror of
https://github.com/urbit/shrub.git
synced 2025-01-07 05:26:56 +03:00
GroupHome: check owner of group for feed banner
This commit is contained in:
parent
fdd2dd4530
commit
4e4e5fa446
@ -9,6 +9,7 @@ import { EnableGroupFeed } from './EnableGroupFeed';
|
|||||||
import { GroupFeed } from './GroupFeed';
|
import { GroupFeed } from './GroupFeed';
|
||||||
import { getFeedPath } from '~/logic/lib/util';
|
import { getFeedPath } from '~/logic/lib/util';
|
||||||
import { GroupFlatFeed } from './GroupFlatFeed';
|
import { GroupFlatFeed } from './GroupFlatFeed';
|
||||||
|
import { resourceFromPath } from '@urbit/api';
|
||||||
|
|
||||||
function GroupHome(props) {
|
function GroupHome(props) {
|
||||||
const {
|
const {
|
||||||
@ -19,12 +20,13 @@ function GroupHome(props) {
|
|||||||
|
|
||||||
const associations = useMetadataState(state => state.associations);
|
const associations = useMetadataState(state => state.associations);
|
||||||
const groups = useGroupState(state => state.groups);
|
const groups = useGroupState(state => state.groups);
|
||||||
|
const { ship } = resourceFromPath(groupPath);
|
||||||
|
|
||||||
const association = associations?.groups[groupPath];
|
const association = associations?.groups[groupPath];
|
||||||
|
|
||||||
const feedPath = getFeedPath(association);
|
const feedPath = getFeedPath(association);
|
||||||
|
|
||||||
const askFeedBanner = feedPath === undefined;
|
const askFeedBanner = feedPath === undefined && `~${window.ship}` === ship;
|
||||||
|
|
||||||
const graphMetadata = associations?.graph[feedPath]?.metadata;
|
const graphMetadata = associations?.graph[feedPath]?.metadata;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user