Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
domain
accounts {
count
}
}
}
`;
const DELETE_DOMAIN_MUTATION = gql`
mutation DELETE_DOMAIN_MUTATION($domainId: Int!) {
deleteDomain(id: $domainId)
}
`;
/* eslint-disable */
const GraphQLComposed = adopt({
domainsQuery: ({ render }) => (
{render}
),
domainsDeleteMutation: ({ render }) => (
{render}
)
});
/* eslint-enable */
class Dashboard extends React.Component {
state = {
dialog: {
open: false,
title: "New Dialog",
form: null
},
id
email
username
domain {
id
domain
}
quota
enabled
sendonly
}
}
`;
/* eslint-disable */
const GraphQLComposed = adopt({
domainsQuery: ({ render }) => (
{render}
),
accountsQuery: ({ render }) => (
{render}
),
accountDeleteMutation: ({ render }) => (
{render}
),
accountUpdateMutation: ({ render }) => (
{(updateAccount, result) => render({ updateAccount, result })}
)
import TakeMyMoney from './TakeMyMoney';
// '@client' tag prevents from query going to server
const LOCAL_STATE_QUERY = gql`
query {
cartOpen @client
}
`;
const TOGGLE_CART_MUTATION = gql`
mutation {
toggleCart @client
}
`;
const Composed = adopt({
user: ({ render }) => {render},
toggleCart: ({ render }) => (
{render}
),
localState: ({ render }) => {render}
});
const Cart = () => (
{({ user, toggleCart, localState }) => {
const { me } = user.data;
if (!me) return null;
return (
<header>
</header>
import Button, { TextButton, IconButton } from "../button";
import DropDown, { DropDownItem } from "../drop-down";
import { Text } from "../drop-down/style";
// import { formatError } from "../../utils";
const QuestionMutation = ({ render }) => (
{(deleteQuestion, result) => render({ deleteQuestion, result })}
);
const CurrentUser = ({ render }) => (
{({ currentUser }) => render({ currentUser })}
);
const Composed = adopt({
mutation: QuestionMutation,
authUser: CurrentUser
});
const Details = ({
question,
currentPage,
handlePaginationChange,
loading,
isEditing,
setIsEditing,
skip,
orderByAnswers
}) => {
const { isOwner } = question;
const [modalOpen, setModalOpen] = React.useState(false);
query={queries.checkpoint}
variables={{ checkpointQuery, isAuthenticated: !!userName }}
>
{({ data }) => {
return render(data.checkpoint);
}}
);
}
};
const mapProps = ({ userName, checkpoint }) => ({
checkpoint
});
export default adopt(mapper, mapProps);
const _push = async (variant, message) => {
const variables = { message, variant };
await addMessage({ variables });
removeMessage();
};
const push = curry(_push);
return {
messages,
success: push(POSITIVE),
warning: push(WARNING),
info: push(INFO),
error: push(NEGATIVE)
};
};
export default adopt(mapper, mapProps);
courseQuery,
course
}) => ({
course,
courseQuery,
userName,
userIsCurator: course && course.curator === userName,
toggleCheckpoint: updateStatus(update),
fork: fork(forkCourse),
save: save(saveCourse, {
courseId,
curator: userName
})
});
export default adopt(mapper, mapProps);