diff --git a/.eslintignore b/.eslintignore index bb32f2c..1d947a8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,4 +6,5 @@ next-sitemap.config.js next.config.js postcss.config.js tailwind.config.js -design.config.js \ No newline at end of file +design.config.js +graphql.config.js \ No newline at end of file diff --git a/DATA_TESTING.md b/DATA_TESTING.md index d108151..a2b7834 100644 --- a/DATA_TESTING.md +++ b/DATA_TESTING.md @@ -30,7 +30,6 @@ The following is all the tests done on the data entries coming from Strapi. This | Text Sets | Credited Translators | Error | High | The Content is a Transcription but credits one or more Translators. | If appropriate, create a Translation Text Set with the Translator credited there. | | Text Sets | Duplicate Language | Error | High | | | - ## LibraryItems | Subitem | Name | Type | Severity | Description | Recommendation | @@ -100,4 +99,4 @@ The following is all the tests done on the data entries coming from Strapi. This | Metadata Group | Has URLs | Error | High | Variant Sets shouldn't have URLs. | | | Metadata Group | Has Contents | Error | High | Variant Sets and Relation Set shouldn't have Contents. | | | Metadata Group | Has Images | Error | High | Variant Sets and Relation Set shouldn't have Images. | | -| Metadata Group | No Subitems | Missing | High | Group Items should have subitems. | +| Metadata Group | No Subitems | Missing | High | Group Items should have subitems. | diff --git a/graphql.config.js b/graphql.config.js new file mode 100644 index 0000000..73f7dcf --- /dev/null +++ b/graphql.config.js @@ -0,0 +1,19 @@ +module.exports = { + projects: { + app: { + schema: process.env.URL_GRAPHQL, + documents: [ + "src/graphql/operations/*.graphql", + "src/graphql/fragments/*.graphql", + ], + extensions: { + endpoints: { + default: { + url: process.env.URL_GRAPHQL, + headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` }, + }, + }, + }, + }, + }, +}; diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 4d133e0..52fa941 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -97,14 +97,13 @@ export const AppLayout = ({ const isMobile = useMediaMobile(); useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - router.events?.on("routeChangeStart", () => { + router.events.on("routeChangeStart", () => { setConfigPanelOpen(false); setMainPanelOpen(false); setSubPanelOpen(false); }); - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - router.events?.on("hashChangeStart", () => { + + router.events.on("hashChangeStart", () => { setSubPanelOpen(false); }); }, [router.events, setConfigPanelOpen, setMainPanelOpen, setSubPanelOpen]); @@ -461,8 +460,8 @@ export const AppLayout = ({