mirror of
https://github.com/wassname/talk.git
synced 2026-08-17 11:27:52 +08:00
[CORL-139, CORL-140] Community (#2239)
* feat: Add table ui component * feat: community user table * feat: filters and role change * fix: add some comments * fix: user viewer * fix: snapshots * test: add tests * fix: better popover experience * fix: test * chore: use enum * feat: prevent server side setting your own role * fix: cleanup
This commit is contained in:
@@ -2,7 +2,7 @@ import { Environment } from "relay-runtime";
|
||||
|
||||
import getViewerSourceID from "./getViewerSourceID";
|
||||
|
||||
export default function getMe(environment: Environment) {
|
||||
export default function getViewer(environment: Environment) {
|
||||
const source = environment.getStore().getSource();
|
||||
const viewerID = getViewerSourceID(environment);
|
||||
if (!viewerID) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Environment, ROOT_ID } from "relay-runtime";
|
||||
|
||||
export default function getMeSourceID(environment: Environment): string | null {
|
||||
export default function getViewerSourceID(
|
||||
environment: Environment
|
||||
): string | null {
|
||||
const source = environment.getStore().getSource();
|
||||
const root = source.get(ROOT_ID)!;
|
||||
if (!root.viewer) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export { default as getViewer } from "./getViewer";
|
||||
export { default as getMeSourceID } from "./getViewerSourceID";
|
||||
export { default as getViewerSourceID } from "./getViewerSourceID";
|
||||
export { default as getURLWithCommentID } from "./getURLWithCommentID";
|
||||
export { default as urls } from "./urls";
|
||||
export { default as createContextHOC } from "./createContextHOC";
|
||||
|
||||
Reference in New Issue
Block a user