diff --git a/apps/kampus/app/pano/PanoFeed.tsx b/apps/kampus/app/pano/PanoFeed.tsx
index 661e7a6e..569b375a 100644
--- a/apps/kampus/app/pano/PanoFeed.tsx
+++ b/apps/kampus/app/pano/PanoFeed.tsx
@@ -1,9 +1,10 @@
import { Suspense, useCallback } from "react";
-import { graphql, usePaginationFragment } from "react-relay";
+import { graphql, useFragment, usePaginationFragment } from "react-relay";
import { Button } from "@kampus/ui-next";
import { PostItem } from "~/app/pano/features/post-list/PostItem";
+import { type PanoFeed_viewer$key } from "./__generated__/PanoFeed_viewer.graphql";
import { type PanoFeedFragment$key } from "./__generated__/PanoFeedFragment.graphql";
const fragment = graphql`
@@ -17,6 +18,7 @@ const fragment = graphql`
@refetchable(queryName: "PanoFeedPaginationQuery") {
panoFeed(first: $first, after: $after, last: $last, before: $before)
@connection(key: "PanoFeedFragment__panoFeed") {
+ __id
edges {
cursor
node {
@@ -28,8 +30,15 @@ const fragment = graphql`
}
`;
+const viewerFragment = graphql`
+ fragment PanoFeed_viewer on Viewer {
+ ...PostItem_viewer
+ }
+`;
+
interface Props {
panoFeed: PanoFeedFragment$key;
+ panoViewer: PanoFeed_viewer$key;
}
export function PanoFeed(props: Props) {
@@ -37,6 +46,7 @@ export function PanoFeed(props: Props) {
fragment,
props.panoFeed
);
+ const viewer = useFragment(viewerFragment, props.panoViewer);
const feed = data.panoFeed;
@@ -60,7 +70,14 @@ export function PanoFeed(props: Props) {
return null;
}
- return ;
+ return (
+
+ );
})}
diff --git a/apps/kampus/app/pano/PostListContainer.tsx b/apps/kampus/app/pano/PostListContainer.tsx
index eee9c796..d3a93228 100644
--- a/apps/kampus/app/pano/PostListContainer.tsx
+++ b/apps/kampus/app/pano/PostListContainer.tsx
@@ -16,6 +16,7 @@ const query = graphql`
query PostListContainerQuery {
viewer {
...PanoFeedFragment
+ ...PanoFeed_viewer
}
}
`;
@@ -28,5 +29,5 @@ export const PostListContainer = (props: Props) => {
return null;
}
- return
;
+ return
;
};
diff --git a/apps/kampus/app/pano/__generated__/PanoFeedFragment.graphql.ts b/apps/kampus/app/pano/__generated__/PanoFeedFragment.graphql.ts
index e80778c7..fae43885 100644
--- a/apps/kampus/app/pano/__generated__/PanoFeedFragment.graphql.ts
+++ b/apps/kampus/app/pano/__generated__/PanoFeedFragment.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<<3c9f3f7de053b4688b2404c72e9daa59>>
+ * @generated SignedSource<<845cce7dd6f615c692812a518c6c92de>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -12,6 +12,7 @@ import { ReaderFragment, RefetchableFragment } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type PanoFeedFragment$data = {
readonly panoFeed: {
+ readonly __id: string;
readonly edges: ReadonlyArray<{
readonly cursor: string;
readonly node: {
@@ -178,6 +179,18 @@ return {
}
],
"storageKey": null
+ },
+ {
+ "kind": "ClientExtension",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "__id",
+ "storageKey": null
+ }
+ ]
}
],
"storageKey": null
@@ -188,6 +201,6 @@ return {
};
})();
-(node as any).hash = "c0d59088c3d65e88fdd5d8da836c2d76";
+(node as any).hash = "169d642e0dd7ef004b6ba9327f096aca";
export default node;
diff --git a/apps/kampus/app/pano/__generated__/PanoFeedPaginationQuery.graphql.ts b/apps/kampus/app/pano/__generated__/PanoFeedPaginationQuery.graphql.ts
index e6de5cd9..cf2714ab 100644
--- a/apps/kampus/app/pano/__generated__/PanoFeedPaginationQuery.graphql.ts
+++ b/apps/kampus/app/pano/__generated__/PanoFeedPaginationQuery.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<<09ed6683c9184c2f89dbaad228142867>>
+ * @generated SignedSource<
>
* @lightSyntaxTransform
* @nogrep
*/
@@ -270,6 +270,18 @@ return {
}
],
"storageKey": null
+ },
+ {
+ "kind": "ClientExtension",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "__id",
+ "storageKey": null
+ }
+ ]
}
],
"storageKey": null
@@ -289,16 +301,16 @@ return {
]
},
"params": {
- "cacheID": "4ca0994c46e6a44f1dc573f87eb2c3b6",
+ "cacheID": "2fa3d4b245b0acc80462563f1be852b7",
"id": null,
"metadata": {},
"name": "PanoFeedPaginationQuery",
"operationKind": "query",
- "text": "query PanoFeedPaginationQuery(\n $after: String\n $before: String\n $first: Int = 10\n $last: Int\n) {\n viewer {\n ...PanoFeedFragment_pbnwq\n }\n}\n\nfragment PanoFeedFragment_pbnwq on Viewer {\n panoFeed(first: $first, after: $after, last: $last, before: $before) {\n edges {\n cursor\n node {\n id\n ...PostItem_post\n __typename\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment PostItem_post on PanoPost {\n id\n title\n content\n url\n createdAt\n site\n ...PostUpvoteButton_post\n owner {\n displayName\n id\n }\n}\n\nfragment PostUpvoteButton_post on PanoPost {\n id\n isUpvotedByViewer\n upvoteCount\n}\n"
+ "text": "query PanoFeedPaginationQuery(\n $after: String\n $before: String\n $first: Int = 10\n $last: Int\n) {\n viewer {\n ...PanoFeedFragment_pbnwq\n }\n}\n\nfragment MoreOptions_post on PanoPost {\n id\n owner {\n displayName\n id\n }\n}\n\nfragment PanoFeedFragment_pbnwq on Viewer {\n panoFeed(first: $first, after: $after, last: $last, before: $before) {\n edges {\n cursor\n node {\n id\n ...PostItem_post\n __typename\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment PostItem_post on PanoPost {\n id\n title\n content\n url\n createdAt\n site\n ...PostUpvoteButton_post\n owner {\n displayName\n id\n }\n ...MoreOptions_post\n}\n\nfragment PostUpvoteButton_post on PanoPost {\n id\n isUpvotedByViewer\n upvoteCount\n}\n"
}
};
})();
-(node as any).hash = "c0d59088c3d65e88fdd5d8da836c2d76";
+(node as any).hash = "169d642e0dd7ef004b6ba9327f096aca";
export default node;
diff --git a/apps/kampus/app/pano/__generated__/PanoFeed_viewer.graphql.ts b/apps/kampus/app/pano/__generated__/PanoFeed_viewer.graphql.ts
new file mode 100644
index 00000000..a1aeb7a0
--- /dev/null
+++ b/apps/kampus/app/pano/__generated__/PanoFeed_viewer.graphql.ts
@@ -0,0 +1,40 @@
+/**
+ * @generated SignedSource<<285a7607218f1bcd3ce4cf4f6613f8d0>>
+ * @lightSyntaxTransform
+ * @nogrep
+ */
+
+/* tslint:disable */
+/* eslint-disable */
+// @ts-nocheck
+
+import { Fragment, ReaderFragment } from 'relay-runtime';
+import { FragmentRefs } from "relay-runtime";
+export type PanoFeed_viewer$data = {
+ readonly " $fragmentSpreads": FragmentRefs<"PostItem_viewer">;
+ readonly " $fragmentType": "PanoFeed_viewer";
+};
+export type PanoFeed_viewer$key = {
+ readonly " $data"?: PanoFeed_viewer$data;
+ readonly " $fragmentSpreads": FragmentRefs<"PanoFeed_viewer">;
+};
+
+const node: ReaderFragment = {
+ "argumentDefinitions": [],
+ "kind": "Fragment",
+ "metadata": null,
+ "name": "PanoFeed_viewer",
+ "selections": [
+ {
+ "args": null,
+ "kind": "FragmentSpread",
+ "name": "PostItem_viewer"
+ }
+ ],
+ "type": "Viewer",
+ "abstractKey": null
+};
+
+(node as any).hash = "aa9717b7dd3561c13af770ff24544e2d";
+
+export default node;
diff --git a/apps/kampus/app/pano/__generated__/PostListContainerQuery.graphql.ts b/apps/kampus/app/pano/__generated__/PostListContainerQuery.graphql.ts
index 967966b2..4a3edfd9 100644
--- a/apps/kampus/app/pano/__generated__/PostListContainerQuery.graphql.ts
+++ b/apps/kampus/app/pano/__generated__/PostListContainerQuery.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<>
+ * @generated SignedSource<>
* @lightSyntaxTransform
* @nogrep
*/
@@ -13,7 +13,7 @@ import { FragmentRefs } from "relay-runtime";
export type PostListContainerQuery$variables = {};
export type PostListContainerQuery$data = {
readonly viewer: {
- readonly " $fragmentSpreads": FragmentRefs<"PanoFeedFragment">;
+ readonly " $fragmentSpreads": FragmentRefs<"PanoFeedFragment" | "PanoFeed_viewer">;
} | null;
};
export type PostListContainerQuery = {
@@ -35,6 +35,20 @@ v1 = {
"kind": "ScalarField",
"name": "id",
"storageKey": null
+},
+v2 = {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "displayName",
+ "storageKey": null
+},
+v3 = {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "__typename",
+ "storageKey": null
};
return {
"fragment": {
@@ -55,6 +69,11 @@ return {
"args": null,
"kind": "FragmentSpread",
"name": "PanoFeedFragment"
+ },
+ {
+ "args": null,
+ "kind": "FragmentSpread",
+ "name": "PanoFeed_viewer"
}
],
"storageKey": null
@@ -166,24 +185,12 @@ return {
"name": "owner",
"plural": false,
"selections": [
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "displayName",
- "storageKey": null
- },
+ (v2/*: any*/),
(v1/*: any*/)
],
"storageKey": null
},
- {
- "alias": null,
- "args": null,
- "kind": "ScalarField",
- "name": "__typename",
- "storageKey": null
- }
+ (v3/*: any*/)
],
"storageKey": null
}
@@ -228,6 +235,18 @@ return {
}
],
"storageKey": null
+ },
+ {
+ "kind": "ClientExtension",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "__id",
+ "storageKey": null
+ }
+ ]
}
],
"storageKey": "panoFeed(first:10)"
@@ -240,6 +259,20 @@ return {
"key": "PanoFeedFragment__panoFeed",
"kind": "LinkedHandle",
"name": "panoFeed"
+ },
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": null,
+ "kind": "LinkedField",
+ "name": "actor",
+ "plural": false,
+ "selections": [
+ (v3/*: any*/),
+ (v2/*: any*/),
+ (v1/*: any*/)
+ ],
+ "storageKey": null
}
],
"storageKey": null
@@ -247,16 +280,16 @@ return {
]
},
"params": {
- "cacheID": "18eb8eaf3693895b2efd987ddc3b9362",
+ "cacheID": "8d8a203cd59b6775cfbc8daaad9001ef",
"id": null,
"metadata": {},
"name": "PostListContainerQuery",
"operationKind": "query",
- "text": "query PostListContainerQuery {\n viewer {\n ...PanoFeedFragment\n }\n}\n\nfragment PanoFeedFragment on Viewer {\n panoFeed(first: 10) {\n edges {\n cursor\n node {\n id\n ...PostItem_post\n __typename\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment PostItem_post on PanoPost {\n id\n title\n content\n url\n createdAt\n site\n ...PostUpvoteButton_post\n owner {\n displayName\n id\n }\n}\n\nfragment PostUpvoteButton_post on PanoPost {\n id\n isUpvotedByViewer\n upvoteCount\n}\n"
+ "text": "query PostListContainerQuery {\n viewer {\n ...PanoFeedFragment\n ...PanoFeed_viewer\n }\n}\n\nfragment MoreOptions_post on PanoPost {\n id\n owner {\n displayName\n id\n }\n}\n\nfragment MoreOptions_viewer on Viewer {\n actor {\n __typename\n displayName\n id\n }\n}\n\nfragment PanoFeedFragment on Viewer {\n panoFeed(first: 10) {\n edges {\n cursor\n node {\n id\n ...PostItem_post\n __typename\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment PanoFeed_viewer on Viewer {\n ...PostItem_viewer\n}\n\nfragment PostItem_post on PanoPost {\n id\n title\n content\n url\n createdAt\n site\n ...PostUpvoteButton_post\n owner {\n displayName\n id\n }\n ...MoreOptions_post\n}\n\nfragment PostItem_viewer on Viewer {\n ...MoreOptions_viewer\n actor {\n __typename\n displayName\n id\n }\n}\n\nfragment PostUpvoteButton_post on PanoPost {\n id\n isUpvotedByViewer\n upvoteCount\n}\n"
}
};
})();
-(node as any).hash = "38254b185df77d46946b76194dd61219";
+(node as any).hash = "246fd8479a18172b183f288ff6f3e842";
export default node;
diff --git a/apps/kampus/app/pano/features/post-list/MoreOptions.tsx b/apps/kampus/app/pano/features/post-list/MoreOptions.tsx
index 66955884..9bf7cc2a 100644
--- a/apps/kampus/app/pano/features/post-list/MoreOptions.tsx
+++ b/apps/kampus/app/pano/features/post-list/MoreOptions.tsx
@@ -1,17 +1,20 @@
"use client";
-import { useRouter } from "next/navigation";
+import Link from "next/link";
import { MoreHorizontal } from "lucide-react";
+import { graphql, useFragment, useMutation } from "react-relay";
import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
Button,
- Dialog,
- DialogContent,
- DialogDescription,
- DialogFooter,
- DialogHeader,
- DialogTitle,
- DialogTrigger,
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
@@ -20,56 +23,81 @@ import {
useToast,
} from "@kampus/ui-next";
+import { type MoreOptions_post$key } from "./__generated__/MoreOptions_post.graphql";
+import { type MoreOptions_viewer$key } from "./__generated__/MoreOptions_viewer.graphql";
+
interface Props {
- post: Post;
- shareUrl: string;
+ post: MoreOptions_post$key;
+ viewerRef: MoreOptions_viewer$key | null;
+ postConnectionId?: string;
}
-type Post = {
- __typename?: "PanoPost";
- content: string;
- createdAt: string;
- id: string;
- owner: string;
- title: string;
- url: string;
-};
-type User = {
- username: string;
-};
+const useMoreOptionsPostFragment = (key: MoreOptions_post$key | null) =>
+ useFragment(
+ graphql`
+ fragment MoreOptions_post on PanoPost {
+ id
+ owner {
+ displayName
+ }
+ }
+ `,
+ key
+ );
-function canUserEdit(user: User, post: Post) {
- console.log(user, post);
- return true;
-}
+const useMoreOptionsViewerFragment = (key: MoreOptions_viewer$key | null) =>
+ useFragment(
+ graphql`
+ fragment MoreOptions_viewer on Viewer {
+ actor {
+ displayName
+ }
+ }
+ `,
+ key
+ );
+
+const removePostMutation = graphql`
+ mutation MoreOptionsRemovePostMutation($connections: [ID!]!, $postID: ID!) {
+ removePanoPost(input: { id: $postID }) {
+ edge {
+ node {
+ id @deleteEdge(connections: $connections)
+ title
+ }
+ }
+ }
+ }
+`;
+
+// TODO: move this to server side
+function canUserEdit(username?: string | null, owner?: string | null) {
+ if (!owner) return false;
+ if (!username) return false;
-export const MoreOptionsDropdown = ({ post, shareUrl }: Props) => {
- const user = { username: "John Doe" };
- console.log(post, shareUrl);
+ return username === owner;
+}
- const router = useRouter();
+export const MoreOptionsDropdown = (props: Props) => {
+ const post = useMoreOptionsPostFragment(props.post);
+ const viewer = useMoreOptionsViewerFragment(props.viewerRef);
const { toast } = useToast();
+ const [removePost, isRemoving] = useMutation(removePostMutation);
- const ownerItems: JSX.Element[] = [];
- if (canUserEdit(user, post)) {
- ownerItems.push(
- router.push(`/posts/${post.id}/edit`)} key="edit">
- Düzenle
-
- );
- ownerItems.push(
-
- Sil
-
- );
- ownerItems.push();
- }
+ const onClick = () => {
+ if (!post) {
+ return;
+ }
- // // FIXME: below appears to be redundant, is it?
- // const menuItems = [...ownerItems];
+ if (isRemoving) {
+ return;
+ }
+
+ removePost({ variables: { postID: post.id, connections: [props.postConnectionId] } });
+ };
return (
-
+
+
+
+ Hayır
+ Evet
+
+
+
);
};
diff --git a/apps/kampus/app/pano/features/post-list/PostItem.tsx b/apps/kampus/app/pano/features/post-list/PostItem.tsx
index 0fa7f3a3..9b3498c9 100644
--- a/apps/kampus/app/pano/features/post-list/PostItem.tsx
+++ b/apps/kampus/app/pano/features/post-list/PostItem.tsx
@@ -7,10 +7,10 @@ import { cn } from "@kampus/ui-next/utils";
import { TimeAgo } from "~/../../packages/ui";
import { type PostItem_post$key } from "./__generated__/PostItem_post.graphql";
+import { type PostItem_viewer$key } from "./__generated__/PostItem_viewer.graphql";
+import { MoreOptionsDropdown } from "./MoreOptions";
import { UpvoteButton } from "./PostUpvoteButton";
-// import { MoreOptionsDropdown } from "./MoreOptions";
-
interface LinkProps {
href: string;
children: string;
@@ -34,7 +34,6 @@ const usePanoPostFragment = (key: PostItem_post$key | null) =>
content
url
createdAt
- id
site
...PostUpvoteButton_post
@@ -42,6 +41,20 @@ const usePanoPostFragment = (key: PostItem_post$key | null) =>
owner @required(action: LOG) {
displayName @required(action: LOG)
}
+ ...MoreOptions_post
+ }
+ `,
+ key
+ );
+
+const usePanoViewerFragment = (key: PostItem_viewer$key | null) =>
+ useFragment(
+ graphql`
+ fragment PostItem_viewer on Viewer {
+ ...MoreOptions_viewer
+ actor {
+ displayName
+ }
}
`,
key
@@ -49,11 +62,14 @@ const usePanoPostFragment = (key: PostItem_post$key | null) =>
interface PostItemProps {
post: PostItem_post$key;
+ viewerRef: PostItem_viewer$key;
showContent?: boolean;
+ postConnectionId?: string;
}
export const PostItem = (props: PostItemProps) => {
const post = usePanoPostFragment(props.post);
+ const viewer = usePanoViewerFragment(props.viewerRef);
if (!post) {
return null;
@@ -78,6 +94,12 @@ export const PostItem = (props: PostItemProps) => {
0 yorum |
+
diff --git a/apps/kampus/app/pano/features/post-list/__generated__/MoreOptionsRemovePostMutation.graphql.ts b/apps/kampus/app/pano/features/post-list/__generated__/MoreOptionsRemovePostMutation.graphql.ts
new file mode 100644
index 00000000..c0c26e25
--- /dev/null
+++ b/apps/kampus/app/pano/features/post-list/__generated__/MoreOptionsRemovePostMutation.graphql.ts
@@ -0,0 +1,189 @@
+/**
+ * @generated SignedSource<>
+ * @lightSyntaxTransform
+ * @nogrep
+ */
+
+/* tslint:disable */
+/* eslint-disable */
+// @ts-nocheck
+
+import { ConcreteRequest, Mutation } from 'relay-runtime';
+export type MoreOptionsRemovePostMutation$variables = {
+ connections: ReadonlyArray;
+ postID: string;
+};
+export type MoreOptionsRemovePostMutation$data = {
+ readonly removePanoPost: {
+ readonly edge: {
+ readonly node: {
+ readonly id: string;
+ readonly title: string;
+ } | null;
+ } | null;
+ } | null;
+};
+export type MoreOptionsRemovePostMutation = {
+ response: MoreOptionsRemovePostMutation$data;
+ variables: MoreOptionsRemovePostMutation$variables;
+};
+
+const node: ConcreteRequest = (function(){
+var v0 = [
+ {
+ "defaultValue": null,
+ "kind": "LocalArgument",
+ "name": "connections"
+ },
+ {
+ "defaultValue": null,
+ "kind": "LocalArgument",
+ "name": "postID"
+ }
+],
+v1 = [
+ {
+ "fields": [
+ {
+ "kind": "Variable",
+ "name": "id",
+ "variableName": "postID"
+ }
+ ],
+ "kind": "ObjectValue",
+ "name": "input"
+ }
+],
+v2 = {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "id",
+ "storageKey": null
+},
+v3 = {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "title",
+ "storageKey": null
+};
+return {
+ "fragment": {
+ "argumentDefinitions": (v0/*: any*/),
+ "kind": "Fragment",
+ "metadata": null,
+ "name": "MoreOptionsRemovePostMutation",
+ "selections": [
+ {
+ "alias": null,
+ "args": (v1/*: any*/),
+ "concreteType": "RemovePanoPostPayload",
+ "kind": "LinkedField",
+ "name": "removePanoPost",
+ "plural": false,
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": "PanoPostEdge",
+ "kind": "LinkedField",
+ "name": "edge",
+ "plural": false,
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": "PanoPost",
+ "kind": "LinkedField",
+ "name": "node",
+ "plural": false,
+ "selections": [
+ (v2/*: any*/),
+ (v3/*: any*/)
+ ],
+ "storageKey": null
+ }
+ ],
+ "storageKey": null
+ }
+ ],
+ "storageKey": null
+ }
+ ],
+ "type": "Mutation",
+ "abstractKey": null
+ },
+ "kind": "Request",
+ "operation": {
+ "argumentDefinitions": (v0/*: any*/),
+ "kind": "Operation",
+ "name": "MoreOptionsRemovePostMutation",
+ "selections": [
+ {
+ "alias": null,
+ "args": (v1/*: any*/),
+ "concreteType": "RemovePanoPostPayload",
+ "kind": "LinkedField",
+ "name": "removePanoPost",
+ "plural": false,
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": "PanoPostEdge",
+ "kind": "LinkedField",
+ "name": "edge",
+ "plural": false,
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": "PanoPost",
+ "kind": "LinkedField",
+ "name": "node",
+ "plural": false,
+ "selections": [
+ (v2/*: any*/),
+ {
+ "alias": null,
+ "args": null,
+ "filters": null,
+ "handle": "deleteEdge",
+ "key": "",
+ "kind": "ScalarHandle",
+ "name": "id",
+ "handleArgs": [
+ {
+ "kind": "Variable",
+ "name": "connections",
+ "variableName": "connections"
+ }
+ ]
+ },
+ (v3/*: any*/)
+ ],
+ "storageKey": null
+ }
+ ],
+ "storageKey": null
+ }
+ ],
+ "storageKey": null
+ }
+ ]
+ },
+ "params": {
+ "cacheID": "6c9942183f760e86a8cbfcf94dbc7ebe",
+ "id": null,
+ "metadata": {},
+ "name": "MoreOptionsRemovePostMutation",
+ "operationKind": "mutation",
+ "text": "mutation MoreOptionsRemovePostMutation(\n $postID: ID!\n) {\n removePanoPost(input: {id: $postID}) {\n edge {\n node {\n id\n title\n }\n }\n }\n}\n"
+ }
+};
+})();
+
+(node as any).hash = "0bc137edfc163648cc5c8a5969e5697a";
+
+export default node;
diff --git a/apps/kampus/app/pano/features/post-list/__generated__/MoreOptions_post.graphql.ts b/apps/kampus/app/pano/features/post-list/__generated__/MoreOptions_post.graphql.ts
new file mode 100644
index 00000000..3f0a86bd
--- /dev/null
+++ b/apps/kampus/app/pano/features/post-list/__generated__/MoreOptions_post.graphql.ts
@@ -0,0 +1,63 @@
+/**
+ * @generated SignedSource<>
+ * @lightSyntaxTransform
+ * @nogrep
+ */
+
+/* tslint:disable */
+/* eslint-disable */
+// @ts-nocheck
+
+import { Fragment, ReaderFragment } from 'relay-runtime';
+import { FragmentRefs } from "relay-runtime";
+export type MoreOptions_post$data = {
+ readonly id: string;
+ readonly owner: {
+ readonly displayName: string | null;
+ } | null;
+ readonly " $fragmentType": "MoreOptions_post";
+};
+export type MoreOptions_post$key = {
+ readonly " $data"?: MoreOptions_post$data;
+ readonly " $fragmentSpreads": FragmentRefs<"MoreOptions_post">;
+};
+
+const node: ReaderFragment = {
+ "argumentDefinitions": [],
+ "kind": "Fragment",
+ "metadata": null,
+ "name": "MoreOptions_post",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "id",
+ "storageKey": null
+ },
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": "User",
+ "kind": "LinkedField",
+ "name": "owner",
+ "plural": false,
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "displayName",
+ "storageKey": null
+ }
+ ],
+ "storageKey": null
+ }
+ ],
+ "type": "PanoPost",
+ "abstractKey": null
+};
+
+(node as any).hash = "01fe2324527daa720ea5ca88add6406c";
+
+export default node;
diff --git a/apps/kampus/app/pano/features/post-list/__generated__/MoreOptions_viewer.graphql.ts b/apps/kampus/app/pano/features/post-list/__generated__/MoreOptions_viewer.graphql.ts
new file mode 100644
index 00000000..ef707e16
--- /dev/null
+++ b/apps/kampus/app/pano/features/post-list/__generated__/MoreOptions_viewer.graphql.ts
@@ -0,0 +1,55 @@
+/**
+ * @generated SignedSource<>
+ * @lightSyntaxTransform
+ * @nogrep
+ */
+
+/* tslint:disable */
+/* eslint-disable */
+// @ts-nocheck
+
+import { Fragment, ReaderFragment } from 'relay-runtime';
+import { FragmentRefs } from "relay-runtime";
+export type MoreOptions_viewer$data = {
+ readonly actor: {
+ readonly displayName: string | null;
+ } | null;
+ readonly " $fragmentType": "MoreOptions_viewer";
+};
+export type MoreOptions_viewer$key = {
+ readonly " $data"?: MoreOptions_viewer$data;
+ readonly " $fragmentSpreads": FragmentRefs<"MoreOptions_viewer">;
+};
+
+const node: ReaderFragment = {
+ "argumentDefinitions": [],
+ "kind": "Fragment",
+ "metadata": null,
+ "name": "MoreOptions_viewer",
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": null,
+ "kind": "LinkedField",
+ "name": "actor",
+ "plural": false,
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "displayName",
+ "storageKey": null
+ }
+ ],
+ "storageKey": null
+ }
+ ],
+ "type": "Viewer",
+ "abstractKey": null
+};
+
+(node as any).hash = "335429bfb4234ab199c74e1828e9bfe2";
+
+export default node;
diff --git a/apps/kampus/app/pano/features/post-list/__generated__/PostItem_post.graphql.ts b/apps/kampus/app/pano/features/post-list/__generated__/PostItem_post.graphql.ts
index a1c7259d..d7bae815 100644
--- a/apps/kampus/app/pano/features/post-list/__generated__/PostItem_post.graphql.ts
+++ b/apps/kampus/app/pano/features/post-list/__generated__/PostItem_post.graphql.ts
@@ -1,5 +1,5 @@
/**
- * @generated SignedSource<>
+ * @generated SignedSource<>
* @lightSyntaxTransform
* @nogrep
*/
@@ -20,7 +20,7 @@ export type PostItem_post$data = {
readonly site: string | null;
readonly title: string;
readonly url: string | null;
- readonly " $fragmentSpreads": FragmentRefs<"PostUpvoteButton_post">;
+ readonly " $fragmentSpreads": FragmentRefs<"MoreOptions_post" | "PostUpvoteButton_post">;
readonly " $fragmentType": "PostItem_post";
} | null;
export type PostItem_post$key = {
@@ -108,12 +108,17 @@ const node: ReaderFragment = {
},
"action": "LOG",
"path": "owner"
+ },
+ {
+ "args": null,
+ "kind": "FragmentSpread",
+ "name": "MoreOptions_post"
}
],
"type": "PanoPost",
"abstractKey": null
};
-(node as any).hash = "2722b74002976e15c158a0be92853b78";
+(node as any).hash = "40952525253258c86b4d4320cf4279a0";
export default node;
diff --git a/apps/kampus/app/pano/features/post-list/__generated__/PostItem_viewer.graphql.ts b/apps/kampus/app/pano/features/post-list/__generated__/PostItem_viewer.graphql.ts
new file mode 100644
index 00000000..3a5b3b4f
--- /dev/null
+++ b/apps/kampus/app/pano/features/post-list/__generated__/PostItem_viewer.graphql.ts
@@ -0,0 +1,61 @@
+/**
+ * @generated SignedSource<<4b69c454a3a58b7052f9e79ba03b1bec>>
+ * @lightSyntaxTransform
+ * @nogrep
+ */
+
+/* tslint:disable */
+/* eslint-disable */
+// @ts-nocheck
+
+import { Fragment, ReaderFragment } from 'relay-runtime';
+import { FragmentRefs } from "relay-runtime";
+export type PostItem_viewer$data = {
+ readonly actor: {
+ readonly displayName: string | null;
+ } | null;
+ readonly " $fragmentSpreads": FragmentRefs<"MoreOptions_viewer">;
+ readonly " $fragmentType": "PostItem_viewer";
+};
+export type PostItem_viewer$key = {
+ readonly " $data"?: PostItem_viewer$data;
+ readonly " $fragmentSpreads": FragmentRefs<"PostItem_viewer">;
+};
+
+const node: ReaderFragment = {
+ "argumentDefinitions": [],
+ "kind": "Fragment",
+ "metadata": null,
+ "name": "PostItem_viewer",
+ "selections": [
+ {
+ "args": null,
+ "kind": "FragmentSpread",
+ "name": "MoreOptions_viewer"
+ },
+ {
+ "alias": null,
+ "args": null,
+ "concreteType": null,
+ "kind": "LinkedField",
+ "name": "actor",
+ "plural": false,
+ "selections": [
+ {
+ "alias": null,
+ "args": null,
+ "kind": "ScalarField",
+ "name": "displayName",
+ "storageKey": null
+ }
+ ],
+ "storageKey": null
+ }
+ ],
+ "type": "Viewer",
+ "abstractKey": null
+};
+
+(node as any).hash = "08a45a50da6ade7e46c243f7477d30ac";
+
+export default node;