Skip to content

Commit

Permalink
fix: renomme la variable pour éviter d'écraser la fonction query
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Feb 26, 2025
1 parent 3a448e4 commit 9b18be1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion front/src/components/Chapter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function Chapter({ article }) {
</Button>
</p>
)}
{renaming && renaming && (
{renaming && (
<form
className={clsx(styles.renamingForm, fieldStyles.inlineFields)}
onSubmit={(e) => rename(e)}
Expand Down
10 changes: 8 additions & 2 deletions front/src/components/Write/Write.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ import styles from './write.module.scss'

import { useActiveUserId } from '../../hooks/user'
import { useGraphQLClient } from '../../helpers/graphQL'
import { getEditableArticle as query, stopSoloSession } from './Write.graphql'
import {
getEditableArticle as getEditableArticleQuery,
stopSoloSession,
} from './Write.graphql'

import ArticleEditorMenu from './ArticleEditorMenu.jsx'
import ArticleEditorMetadata from './ArticleEditorMetadata.jsx'
Expand Down Expand Up @@ -226,7 +229,10 @@ export default function Write() {

setIsLoading(true)
;(async () => {
const data = await query({ query, variables }).catch((error) => {
const data = await query({
query: getEditableArticleQuery,
variables,
}).catch((error) => {
setGraphQLError(error)
return {}
})
Expand Down

0 comments on commit 9b18be1

Please sign in to comment.