@graphcommerce/ecommerce-ui 8.0.3-canary.1 → 8.0.3-canary.2
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,12 @@
|
|
|
1
1
|
# @graphcommerce/ecommerce-ui
|
|
2
2
|
|
|
3
|
+
## 8.0.3-canary.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2205](https://github.com/graphcommerce-org/graphcommerce/pull/2205) [`eb14696`](https://github.com/graphcommerce-org/graphcommerce/commit/eb14696fc65e084a06790c88a8218fb3003f7c2c) - `<WaitForQueries/>` will default to loading, restoring the previous behavior. This might introduce , this might introduce an additional spinner but prevents a flash where it is shown that there is no cart
|
|
8
|
+
([@paales](https://github.com/paales))
|
|
9
|
+
|
|
3
10
|
## 8.0.3-canary.1
|
|
4
11
|
|
|
5
12
|
## 8.0.3-canary.0
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useIsomorphicLayoutEffect } from '@graphcommerce/framer-utils'
|
|
1
2
|
import { QueryResult } from '@graphcommerce/graphql'
|
|
2
3
|
import React, { startTransition, useEffect, useState } from 'react'
|
|
3
4
|
|
|
@@ -10,13 +11,13 @@ export type WaitForQueriesProps = {
|
|
|
10
11
|
|
|
11
12
|
/** Shows the fallback during: SSR, Hydration and Query Loading. */
|
|
12
13
|
export const WaitForQueries = (props: WaitForQueriesProps) => {
|
|
13
|
-
const { waitFor, fallback, children, noSsr =
|
|
14
|
+
const { waitFor, fallback, children, noSsr = true } = props
|
|
14
15
|
|
|
15
16
|
// Make sure the first render is always the same as the server.
|
|
16
17
|
// Make sure we we use startTransition to make sure we don't get into trouble with Suspense.
|
|
17
18
|
const [mounted, setMounted] = useState(!noSsr)
|
|
18
19
|
useEffect(() => {
|
|
19
|
-
if (noSsr)
|
|
20
|
+
if (noSsr) setMounted(true)
|
|
20
21
|
}, [noSsr])
|
|
21
22
|
|
|
22
23
|
// We are done when all queries either have data or an error.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/ecommerce-ui",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "8.0.3-canary.
|
|
5
|
+
"version": "8.0.3-canary.2",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^8.0.3-canary.
|
|
16
|
-
"@graphcommerce/graphql": "^8.0.3-canary.
|
|
17
|
-
"@graphcommerce/next-ui": "^8.0.3-canary.
|
|
18
|
-
"@graphcommerce/prettier-config-pwa": "^8.0.3-canary.
|
|
19
|
-
"@graphcommerce/react-hook-form": "^8.0.3-canary.
|
|
20
|
-
"@graphcommerce/typescript-config-pwa": "^8.0.3-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^8.0.3-canary.2",
|
|
16
|
+
"@graphcommerce/graphql": "^8.0.3-canary.2",
|
|
17
|
+
"@graphcommerce/next-ui": "^8.0.3-canary.2",
|
|
18
|
+
"@graphcommerce/prettier-config-pwa": "^8.0.3-canary.2",
|
|
19
|
+
"@graphcommerce/react-hook-form": "^8.0.3-canary.2",
|
|
20
|
+
"@graphcommerce/typescript-config-pwa": "^8.0.3-canary.2",
|
|
21
21
|
"@lingui/core": "^4.2.1",
|
|
22
22
|
"@lingui/macro": "^4.2.1",
|
|
23
23
|
"@lingui/react": "^4.2.1",
|