@akinon/next 1.13.0 → 1.13.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,11 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix build error
8
+
3
9
  ## 1.13.0
4
10
 
5
11
  ### Minor Changes
@@ -1,7 +1,7 @@
1
- import plugins from '@theme/plugins';
2
- import settings from '@theme/settings';
3
- import { useAppSelector } from '@akinon/next/redux/hooks';
4
- import { RootState } from '@theme/redux/store';
1
+ import plugins from 'plugins';
2
+ import Settings from 'settings';
3
+ import { useAppSelector } from '../redux/hooks';
4
+ import { RootState } from 'redux/store';
5
5
 
6
6
  export const usePaymentOptions = () => {
7
7
  const { paymentOptions } = useAppSelector(
@@ -21,27 +21,22 @@ export const usePaymentOptions = () => {
21
21
 
22
22
  const isInitialTypeIncluded = (type: string) => initialTypes.has(type);
23
23
 
24
- const isPluginMapIncluded = (type: string) => {
25
- if (paymentTypeToPluginMap.hasOwnProperty(type)) {
26
- const pluginName = paymentTypeToPluginMap[type];
27
- return plugins.includes(pluginName);
28
- }
29
- return false;
30
- };
24
+ const isPluginMapIncluded = (type: string) =>
25
+ paymentTypeToPluginMap[type]
26
+ ? plugins.includes(paymentTypeToPluginMap[type])
27
+ : false;
31
28
 
32
29
  const isExtraTypeIncluded = (type: string) => {
33
- const extraPaymentTypes = settings?.checkout?.extraPaymentTypes || [];
34
-
30
+ const extraPaymentTypes = Settings?.checkout?.extraPaymentTypes || [];
35
31
  return (
36
32
  extraPaymentTypes.includes(type) &&
37
33
  !initialTypes.has(type) &&
38
- !paymentTypeToPluginMap.hasOwnProperty(type)
34
+ !paymentTypeToPluginMap[type]
39
35
  );
40
36
  };
41
37
 
42
38
  const filteredPaymentOptions = paymentOptions.filter((option) => {
43
39
  const { payment_type } = option;
44
-
45
40
  return (
46
41
  isInitialTypeIncluded(payment_type) ||
47
42
  isPluginMapIncluded(payment_type) ||
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.13.0",
4
+ "version": "1.13.1",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "@typescript-eslint/eslint-plugin": "6.7.4",
27
27
  "@typescript-eslint/parser": "6.7.4",
28
28
  "eslint": "^8.14.0",
29
- "@akinon/eslint-plugin-projectzero": "1.13.0",
29
+ "@akinon/eslint-plugin-projectzero": "1.13.1",
30
30
  "eslint-config-prettier": "8.5.0"
31
31
  }
32
32
  }