@graphcommerce/magento-store 4.1.9 → 4.2.0
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,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1416](https://github.com/graphcommerce-org/graphcommerce/pull/1416) [`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - SEO audit
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]:
|
|
12
|
+
- @graphcommerce/next-ui@4.7.0
|
|
13
|
+
|
|
3
14
|
## 4.1.9
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery } from '@graphcommerce/graphql'
|
|
2
2
|
import { FlagAvatar, extendableComponent } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Button, SxProps, Theme } from '@mui/material'
|
|
4
|
-
import
|
|
4
|
+
import { useRouter } from 'next/router'
|
|
5
5
|
import { StoreConfigDocument } from '../../StoreConfig.gql'
|
|
6
6
|
|
|
7
7
|
export type StoreSwitcherButtonProps = { sx?: SxProps<Theme> }
|
|
@@ -14,17 +14,22 @@ export function StoreSwitcherButton(props: StoreSwitcherButtonProps) {
|
|
|
14
14
|
const { sx } = props
|
|
15
15
|
const config = useQuery(StoreConfigDocument)
|
|
16
16
|
const country = config.data?.storeConfig?.locale?.split('_')?.[1]?.toLowerCase() ?? ''
|
|
17
|
+
const router = useRouter()
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
<Button
|
|
21
|
+
variant='text'
|
|
22
|
+
size='medium'
|
|
23
|
+
className={classes.root}
|
|
24
|
+
onClick={() => router.push('/switch-stores')}
|
|
25
|
+
sx={sx}
|
|
26
|
+
>
|
|
27
|
+
<FlagAvatar
|
|
28
|
+
country={country}
|
|
29
|
+
className={classes.avatar}
|
|
30
|
+
sx={{ height: 20, width: 20, marginRight: '10px' }}
|
|
31
|
+
/>
|
|
32
|
+
{config.data?.storeConfig?.store_name} - {config.data?.storeConfig?.base_currency_code}
|
|
33
|
+
</Button>
|
|
29
34
|
)
|
|
30
35
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-store",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.2.0",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@graphcommerce/graphql": "3.1.1",
|
|
23
23
|
"@graphcommerce/graphql-mesh": "4.1.2",
|
|
24
24
|
"@graphcommerce/image": "3.1.5",
|
|
25
|
-
"@graphcommerce/next-ui": "4.
|
|
25
|
+
"@graphcommerce/next-ui": "4.7.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@lingui/macro": "^3.13.2",
|