@tinacms/app 2.4.2 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @tinacms/app
2
2
 
3
+ ## 2.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#6687](https://github.com/tinacms/tinacms/pull/6687) [`a526f9f`](https://github.com/tinacms/tinacms/commit/a526f9f4c37a0aaefb572c9dcc562d89aa9e5c7e) Thanks [@brookjeynes-ssw](https://github.com/brookjeynes-ssw)! - feat: simplify errors shown to users
8
+
9
+ - Updated dependencies [[`4672251`](https://github.com/tinacms/tinacms/commit/4672251c813e51f4471f025943008d2dea700aca), [`ca725ac`](https://github.com/tinacms/tinacms/commit/ca725acb42be499c146d76b12982e05a8127f81e), [`a526f9f`](https://github.com/tinacms/tinacms/commit/a526f9f4c37a0aaefb572c9dcc562d89aa9e5c7e), [`b260b5e`](https://github.com/tinacms/tinacms/commit/b260b5ed4beb5d678b9605357b99a8667fddc8de), [`b56dad4`](https://github.com/tinacms/tinacms/commit/b56dad42d2216ac9c8f90f19b78a4951ca97a61f)]:
10
+ - tinacms@3.7.4
11
+
12
+ ## 2.4.3
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`cd262b3`](https://github.com/tinacms/tinacms/commit/cd262b311c218ea4e5b5bb8abbbe54fcff3b8054), [`55dae8e`](https://github.com/tinacms/tinacms/commit/55dae8eef898f49f827c00bc72297863d0d69be1), [`217bfb4`](https://github.com/tinacms/tinacms/commit/217bfb4ff2c1a61fa7b6df3ea460b192b5179bb7), [`5feb18d`](https://github.com/tinacms/tinacms/commit/5feb18d0d3032bbcd6a5aad678208c0dde19bf81), [`32e145d`](https://github.com/tinacms/tinacms/commit/32e145d4859cbc710a222f2a01c55ca7b29a080b), [`d998884`](https://github.com/tinacms/tinacms/commit/d9988849ad67fb5e9d7e233c1ccca0cb0c031c3e), [`c75d871`](https://github.com/tinacms/tinacms/commit/c75d87121224f91dc4e5e2aa8af60b0881b87a5b)]:
17
+ - tinacms@3.7.3
18
+ - @tinacms/mdx@2.1.2
19
+
3
20
  ## 2.4.2
4
21
 
5
22
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "main": "src/main.tsx",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
@@ -26,8 +26,8 @@
26
26
  "react-router-dom": "6.3.0",
27
27
  "typescript": "^5.7.3",
28
28
  "zod": "^3.24.2",
29
- "@tinacms/mdx": "2.1.1",
30
- "tinacms": "3.7.2"
29
+ "@tinacms/mdx": "2.1.2",
30
+ "tinacms": "3.7.4"
31
31
  },
32
32
  "repository": {
33
33
  "url": "https://github.com/tinacms/tinacms.git",
@@ -1,24 +1,27 @@
1
1
  import React from 'react';
2
2
  import { TinaCMS } from 'tinacms';
3
3
 
4
- const ErrorModalContent = (props: { title: string; errors: string[] }) => {
5
- const { title, errors } = props;
4
+ const TROUBLESHOOTING_URL = 'https://tina.io/docs/tinacloud/troubleshooting';
5
+
6
+ const ErrorModalContent = (props: { title: string; message: string }) => {
7
+ const { title, message } = props;
6
8
  return (
7
9
  <>
8
10
  <div>{title}</div>
9
- <ul>
10
- {errors.map((error, i) => (
11
- <li key={i}>{error}</li>
12
- ))}
13
- </ul>
11
+ <p>{message}</p>
12
+ <a href={TROUBLESHOOTING_URL} target='_blank' rel='noopener noreferrer'>
13
+ Try these troubleshooting tips
14
+ </a>
14
15
  </>
15
16
  );
16
17
  };
17
18
 
18
19
  export const showErrorModal = (
19
20
  title: string,
20
- errors: string[],
21
+ message: string,
21
22
  cms: TinaCMS
22
23
  ) => {
23
- cms.alerts.error(() => <ErrorModalContent title={title} errors={errors} />);
24
+ if (cms.alerts.all.some((a: { level: string }) => a.level === 'error'))
25
+ return;
26
+ cms.alerts.error(() => <ErrorModalContent title={title} message={message} />);
24
27
  };
@@ -613,7 +613,12 @@ export const useGraphQLReducer = (
613
613
 
614
614
  React.useEffect(() => {
615
615
  if (requestErrors.length) {
616
- showErrorModal('Unexpected error querying content', requestErrors, cms);
616
+ console.error('Unexpected error querying content:', requestErrors);
617
+ showErrorModal(
618
+ 'Unexpected Error',
619
+ 'We ran into an unexpected error while fetching your content. If after refreshing the issue persists, reach out to us on Discord.',
620
+ cms
621
+ );
617
622
  }
618
623
  }, [requestErrors]);
619
624
  };