@graphcommerce/magento-store 4.1.7 → 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,32 @@
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
+
14
+ ## 4.1.9
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`ba8cd4d34`](https://github.com/graphcommerce-org/graphcommerce/commit/ba8cd4d3480a7ec7e555b051cfd0fbc809c7aa12)]:
19
+ - @graphcommerce/graphql-mesh@4.1.2
20
+
21
+ ## 4.1.8
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [[`06f7bdff8`](https://github.com/graphcommerce-org/graphcommerce/commit/06f7bdff882396f2b0e1a2873fbb718c7b06fab4), [`100f4c38c`](https://github.com/graphcommerce-org/graphcommerce/commit/100f4c38c8fcda4bc6e0425e38028b550b60adc2)]:
26
+ - @graphcommerce/graphql-mesh@4.1.1
27
+ - @graphcommerce/graphql@3.1.1
28
+ - @graphcommerce/next-ui@4.6.2
29
+
3
30
  ## 4.1.7
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.7",
5
+ "version": "4.2.0",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,17 +12,17 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.5",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.6",
16
16
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
17
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
18
18
  "@playwright/test": "^1.21.1",
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/graphql": "3.1.0",
23
- "@graphcommerce/graphql-mesh": "4.1.0",
22
+ "@graphcommerce/graphql": "3.1.1",
23
+ "@graphcommerce/graphql-mesh": "4.1.2",
24
24
  "@graphcommerce/image": "3.1.5",
25
- "@graphcommerce/next-ui": "4.6.1"
25
+ "@graphcommerce/next-ui": "4.7.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@lingui/macro": "^3.13.2",