mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
Merge pull request #4411 from urbit/la/link-perm
interface: don't show link submit when empty collection and we don't have permission
This commit is contained in:
commit
22da150305
@ -9,7 +9,6 @@ import { uxToHex } from '~/logic/lib/util';
|
|||||||
import { RouteComponentProps } from "react-router-dom";
|
import { RouteComponentProps } from "react-router-dom";
|
||||||
|
|
||||||
import { LinkItem } from "./components/LinkItem";
|
import { LinkItem } from "./components/LinkItem";
|
||||||
import LinkSubmit from "./components/LinkSubmit";
|
|
||||||
import { LinkPreview } from "./components/link-preview";
|
import { LinkPreview } from "./components/link-preview";
|
||||||
import { LinkWindow } from "./LinkWindow";
|
import { LinkWindow } from "./LinkWindow";
|
||||||
import { Comments } from "~/views/components/Comments";
|
import { Comments } from "~/views/components/Comments";
|
||||||
@ -50,6 +49,7 @@ export function LinkResource(props: LinkResourceProps) {
|
|||||||
: { metadata: {} };
|
: { metadata: {} };
|
||||||
const contactDetails = contacts[resource?.group] || {};
|
const contactDetails = contacts[resource?.group] || {};
|
||||||
const group = groups[resource?.group] || {};
|
const group = groups[resource?.group] || {};
|
||||||
|
|
||||||
const graph = graphs[resourcePath] || null;
|
const graph = graphs[resourcePath] || null;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -63,9 +63,14 @@ export function LinkWindow(props: LinkWindowProps) {
|
|||||||
|
|
||||||
if (!first) {
|
if (!first) {
|
||||||
return (
|
return (
|
||||||
<Col key={0} mx="auto" mt="4" maxWidth="768px" width="100%" flexShrink={0} px={3}>
|
<Col key={0} mx="auto" mt="4" maxWidth="768px" width="100%" flexShrink={0} px={3}>
|
||||||
|
{ canWrite ? (
|
||||||
<LinkSubmit s3={props.s3} name={name} ship={ship.slice(1)} api={api} />
|
<LinkSubmit s3={props.s3} name={name} ship={ship.slice(1)} api={api} />
|
||||||
</Col>
|
) : (
|
||||||
|
<Text>There are no links here yet. You do not have permission to post to this collection.</Text>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</Col>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user