[next] Bugfixes (#2272)

* feat: suspending, banning, now propogation

* feat: new mutation api with hooks support

* [CORL-343] Center Spinner in Stream

* [CORL-344] Fix moderation card styling

* [CORL-338] Fix permalink reply bug

* [CORL-337] Fix community guidelines box width

* [CORL-341] Toggle reply form view when clicking on reply

* test: add tests

* [CORL-333] Fix bug: removing message box icon; [CORL-336] Fix bug: allow resetting custom css
This commit is contained in:
Kiwi
2019-04-23 20:29:58 +00:00
committed by Wyatt Johnson
parent 5150cdf60e
commit a92dcd6224
29 changed files with 745 additions and 439 deletions
@@ -1,8 +0,0 @@
import { Environment } from "relay-runtime";
export default function getStory(environment: Environment, id: string) {
return environment
.getStore()
.getSource()
.get(id);
}
@@ -1,15 +0,0 @@
import { Environment } from "relay-runtime";
import getStory from "./getStory";
export default function getStorySettings(environment: Environment, id: string) {
const story = getStory(environment, id);
if (!story) {
return null;
}
const storySettingsRef = story.settings.__ref;
return environment
.getStore()
.getSource()
.get(storySettingsRef);
}
@@ -1,12 +1,13 @@
import { Environment } from "relay-runtime";
import { lookup } from "talk-framework/lib/relay";
import { GQLUser } from "talk-framework/schema";
import getViewerSourceID from "./getViewerSourceID";
export default function getViewer(environment: Environment) {
const source = environment.getStore().getSource();
const viewerID = getViewerSourceID(environment);
if (!viewerID) {
return null;
}
return source.get(viewerID)!;
return lookup<GQLUser>(environment, viewerID)!;
}
@@ -7,5 +7,3 @@ export { default as redirectOAuth2 } from "./redirectOAuth2";
export {
default as getParamsFromHashAndClearIt,
} from "./getParamsFromHashAndClearIt";
export { default as getStory } from "./getStory";
export { default as getStorySettings } from "./getStorySettings";