diff --git a/app/web/src/components/NavPlusButton/NavPlusButton.tsx b/app/web/src/components/NavPlusButton/NavPlusButton.tsx index 7fb3fde..f9823d3 100644 --- a/app/web/src/components/NavPlusButton/NavPlusButton.tsx +++ b/app/web/src/components/NavPlusButton/NavPlusButton.tsx @@ -4,11 +4,23 @@ import { useMutation } from '@redwoodjs/web' import { toast } from '@redwoodjs/web/toast' import useUser from 'src/helpers/hooks/useUser' -import { CREATE_PROJECT_MUTATION } from 'src/components/ProjectCell/ProjectCell' import Svg from 'src/components/Svg/Svg' import { Popover } from '@headlessui/react' import { CadPackageType } from 'src/components/CadPackage/CadPackage' +export const CREATE_PROJECT_MUTATION = gql` + mutation CreateProjectMutation($input: CreateProjectInput!) { + createProject(input: $input) { + id + title + user { + id + userName + } + } + } +` + const menuOptions: { name: string sub: string diff --git a/app/web/src/components/ProjectCell/ProjectCell.tsx b/app/web/src/components/ProjectCell/ProjectCell.tsx index 7362156..8c41c20 100644 --- a/app/web/src/components/ProjectCell/ProjectCell.tsx +++ b/app/web/src/components/ProjectCell/ProjectCell.tsx @@ -4,6 +4,7 @@ import { navigate, routes } from '@redwoodjs/router' import { useAuth } from '@redwoodjs/auth' import { useIdeState } from 'src/helpers/hooks/useIdeState' import { IdeContext } from 'src/helpers/hooks/useIdeContext' +import { CREATE_PROJECT_MUTATION } from 'src/components/NavPlusButton/NavPlusButton' import ProjectProfile from 'src/components/ProjectProfile/ProjectProfile' import { QUERY as PROJECT_REACTION_QUERY } from 'src/components/ProjectReactionsCell' @@ -76,18 +77,7 @@ const UPDATE_PROJECT_MUTATION = gql` } } ` -export const CREATE_PROJECT_MUTATION = gql` - mutation CreateProjectMutation($input: CreateProjectInput!) { - createProject(input: $input) { - id - title - user { - id - userName - } - } - } -` + const TOGGLE_REACTION_MUTATION = gql` mutation ToggleReactionMutation($input: ToggleProjectReactionInput!) { toggleProjectReaction(input: $input) {