@graphcommerce/magento-store 4.1.8 → 4.2.1

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,32 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`25ef6cf08`](https://github.com/graphcommerce-org/graphcommerce/commit/25ef6cf08c278105307d6f604b7135d637e9046c), [`80e30bb77`](https://github.com/graphcommerce-org/graphcommerce/commit/80e30bb77015755fbc00a7935d590f80c1c1c18c)]:
8
+ - @graphcommerce/graphql@3.1.2
9
+ - @graphcommerce/graphql-mesh@4.1.3
10
+ - @graphcommerce/next-ui@4.7.1
11
+
12
+ ## 4.2.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#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
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]:
21
+ - @graphcommerce/next-ui@4.7.0
22
+
23
+ ## 4.1.9
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [[`ba8cd4d34`](https://github.com/graphcommerce-org/graphcommerce/commit/ba8cd4d3480a7ec7e555b051cfd0fbc809c7aa12)]:
28
+ - @graphcommerce/graphql-mesh@4.1.2
29
+
3
30
  ## 4.1.8
4
31
 
5
32
  ### 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 PageLink from 'next/link'
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
- <PageLink href='/switch-stores' passHref>
20
- <Button variant='text' size='medium' className={classes.root} sx={sx}>
21
- <FlagAvatar
22
- country={country}
23
- className={classes.avatar}
24
- sx={{ height: 20, width: 20, marginRight: '10px' }}
25
- />
26
- {config.data?.storeConfig?.store_name} - {config.data?.storeConfig?.base_currency_code}
27
- </Button>
28
- </PageLink>
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.1.8",
5
+ "version": "4.2.1",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,10 +19,10 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/graphql": "3.1.1",
23
- "@graphcommerce/graphql-mesh": "4.1.1",
22
+ "@graphcommerce/graphql": "3.1.2",
23
+ "@graphcommerce/graphql-mesh": "4.1.3",
24
24
  "@graphcommerce/image": "3.1.5",
25
- "@graphcommerce/next-ui": "4.6.2"
25
+ "@graphcommerce/next-ui": "4.7.1"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@lingui/macro": "^3.13.2",