mirror of
https://github.com/wassname/talk.git
synced 2026-07-25 13:30:59 +08:00
[CORL-420] Upgrade Relay (#2346)
* chore: upgrade Relay * fix: fix errors * fix: snapshot * fix: relay prefix * fix: fragment spec error
This commit is contained in:
+2
-2
@@ -4,12 +4,12 @@ exports[`renders correctly 1`] = `
|
||||
<li
|
||||
className="customClassName"
|
||||
>
|
||||
<Link
|
||||
<ForwardRef(render)
|
||||
activeClassName="Link-linkActive"
|
||||
className="Link-link"
|
||||
to="/admin"
|
||||
>
|
||||
child
|
||||
</Link>
|
||||
</ForwardRef(render)>
|
||||
</li>
|
||||
`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { withRouter, WithRouter } from "found";
|
||||
import { RouterState, withRouter } from "found";
|
||||
import * as React from "react";
|
||||
import { Component } from "react";
|
||||
|
||||
@@ -25,7 +25,7 @@ type Props = {
|
||||
auth: AuthData;
|
||||
viewer: UserData | null;
|
||||
setRedirectPath: MutationProp<typeof SetRedirectPathMutation>;
|
||||
} & WithRouter;
|
||||
} & RouterState;
|
||||
|
||||
function handleAccountCompletion(props: Props) {
|
||||
const {
|
||||
|
||||
@@ -9,7 +9,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const NavigationLink: FunctionComponent<Props> = props => (
|
||||
<Link to={props.to} Component={SubBarNavigationItem} activePropName="active">
|
||||
<Link to={props.to} as={SubBarNavigationItem} activePropName="active">
|
||||
{props.children}
|
||||
</Link>
|
||||
);
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ exports[`renders correctly 1`] = `
|
||||
<div
|
||||
data-testid="moderate-container"
|
||||
>
|
||||
<withRouter(Relay(ModerateSearchBarContainer))
|
||||
<ForwardRef(render)
|
||||
allStories={true}
|
||||
story={Object {}}
|
||||
/>
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`renders correctly 1`] = `
|
||||
<Link
|
||||
Component={[Function]}
|
||||
<ForwardRef(render)
|
||||
activePropName="active"
|
||||
as={[Function]}
|
||||
to="/moderate"
|
||||
>
|
||||
link
|
||||
</Link>
|
||||
</ForwardRef(render)>
|
||||
`;
|
||||
|
||||
+2
-2
@@ -12,12 +12,12 @@ exports[`renders correctly 1`] = `
|
||||
<Localized
|
||||
id="moderate-single-goToModerationQueues"
|
||||
>
|
||||
<Link
|
||||
<ForwardRef(render)
|
||||
className="SingleModerate-subBarBegin"
|
||||
to="/admin/moderate/"
|
||||
>
|
||||
Go to moderation queues
|
||||
</Link>
|
||||
</ForwardRef(render)>
|
||||
</Localized>
|
||||
<Localized
|
||||
id="moderate-single-singleCommentView"
|
||||
|
||||
@@ -20,11 +20,12 @@ export class FlagDetailsContainer extends React.Component<Props> {
|
||||
const nodes = this.props.comment.flags.nodes;
|
||||
const offensiveList: React.ReactElement[] = [];
|
||||
const spamList: React.ReactElement[] = [];
|
||||
nodes.forEach(n => {
|
||||
nodes.forEach((n, i) => {
|
||||
switch (n.reason) {
|
||||
case GQLCOMMENT_FLAG_REASON.COMMENT_REPORTED_OFFENSIVE:
|
||||
offensiveList.push(
|
||||
<FlagDetailsEntry
|
||||
key={i}
|
||||
user={n.flagger ? n.flagger.username : <NotAvailable />}
|
||||
details={n.additionalDetails}
|
||||
/>
|
||||
@@ -33,6 +34,7 @@ export class FlagDetailsContainer extends React.Component<Props> {
|
||||
case GQLCOMMENT_FLAG_REASON.COMMENT_REPORTED_SPAM:
|
||||
spamList.push(
|
||||
<FlagDetailsEntry
|
||||
key={i}
|
||||
user={n.flagger ? n.flagger.username : <NotAvailable />}
|
||||
details={n.additionalDetails}
|
||||
/>
|
||||
|
||||
@@ -23,10 +23,7 @@ interface Props {
|
||||
const UserRow: FunctionComponent<Props> = props => (
|
||||
<TableRow>
|
||||
<TableCell className={styles.titleColumn}>
|
||||
<Link
|
||||
to={getModerationLink("default", props.storyID)}
|
||||
Component={TextLink}
|
||||
>
|
||||
<Link to={getModerationLink("default", props.storyID)} as={TextLink}>
|
||||
{props.title || <NotAvailable />}
|
||||
</Link>
|
||||
</TableCell>
|
||||
|
||||
Reference in New Issue
Block a user