@licklist/design 0.78.7 → 0.78.8

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.
Files changed (153) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/affiliate/form/AffiliateForm.js +6 -2
  3. package/dist/auth/AccessDenied/AccessDenied.d.ts.map +1 -1
  4. package/dist/auth/AccessDenied/AccessDenied.js +4 -3
  5. package/dist/auth/Authorizer.d.ts.map +1 -1
  6. package/dist/auth/Authorizer.js +10 -6
  7. package/dist/auth/ChangePassword/ChangePasswordComponent.d.ts.map +1 -1
  8. package/dist/auth/ChangePassword/ChangePasswordComponent.js +36 -41
  9. package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
  10. package/dist/auth/Layout/AuthNavComponent.js +2 -3
  11. package/dist/auth/Layout/UserNavDropDown.d.ts.map +1 -1
  12. package/dist/auth/Layout/UserNavDropDown.js +8 -9
  13. package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
  14. package/dist/auth/Login/LoginComponent.js +57 -60
  15. package/dist/auth/Logout/Logout.d.ts.map +1 -1
  16. package/dist/auth/Logout/Logout.js +4 -2
  17. package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
  18. package/dist/auth/Register/RegisterComponent.js +53 -58
  19. package/dist/auth/ResetPassword/ResetPasswordComponent.d.ts.map +1 -1
  20. package/dist/auth/ResetPassword/ResetPasswordComponent.js +26 -30
  21. package/dist/auth/Social/SocialCallbackComponent.d.ts.map +1 -1
  22. package/dist/auth/Social/SocialCallbackComponent.js +3 -3
  23. package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts +2 -2
  24. package/dist/custom-fields/field-set/providers/CustomFieldSetsProvider.d.ts.map +1 -1
  25. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +0 -1
  26. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
  27. package/dist/events/event-card/EventCard.d.ts +1 -1
  28. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  29. package/dist/events/event-card/EventCard.js +1 -1
  30. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  31. package/dist/events/event-statistic-modal/EventStatisticModal.js +0 -1
  32. package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts +2 -2
  33. package/dist/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.d.ts.map +1 -1
  34. package/dist/file-upload/FileUpload.d.ts +1 -1
  35. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +1 -2
  36. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -1
  37. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +3 -4
  38. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -1
  39. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +5 -6
  40. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +1 -2
  41. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -1
  42. package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.d.ts.map +1 -1
  43. package/dist/iframe/event/event-navigation-footer/EventNavigationFooter.js +3 -2
  44. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  45. package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.js +3 -3
  46. package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts +2 -2
  47. package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts.map +1 -1
  48. package/dist/iframe/payment/order-items-table/OrderItemsTable.js +0 -1
  49. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +0 -5
  50. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  51. package/dist/iframe/payment/payment-form/PaymentForm.js +0 -1
  52. package/dist/iframe/payment/payment-page/PaymentPage.d.ts +1 -1
  53. package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
  54. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  55. package/dist/iframe/ryft/RyftPaymentForm.js +1 -3
  56. package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -1
  57. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +3 -1
  61. package/dist/modals/dialog/Dialog.d.ts.map +1 -1
  62. package/dist/modals/dialog/Dialog.js +39 -41
  63. package/dist/modals/dialog/DialogContext.d.ts +2 -2
  64. package/dist/modals/dialog/DialogContext.d.ts.map +1 -1
  65. package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
  66. package/dist/pages/PrivacyComponent.d.ts +3 -0
  67. package/dist/pages/PrivacyComponent.d.ts.map +1 -0
  68. package/dist/pages/PrivacyComponent.js +536 -0
  69. package/dist/pages/TermsComponent.d.ts +3 -0
  70. package/dist/pages/TermsComponent.d.ts.map +1 -0
  71. package/dist/pages/TermsComponent.js +682 -0
  72. package/dist/pages/index.d.ts +3 -0
  73. package/dist/pages/index.d.ts.map +1 -0
  74. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  75. package/dist/product-set/card/ProductSetCard.js +3 -2
  76. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  77. package/dist/product-set/form/ProductsControl.js +1 -1
  78. package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -2
  79. package/dist/product-set/utils/index.d.ts +1 -1
  80. package/dist/product-set/utils/index.d.ts.map +1 -1
  81. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  82. package/dist/recurrence-input/RecurrenceInput.js +1 -1
  83. package/dist/sales/notes/NotesTableRow.js +0 -1
  84. package/dist/sales/payment-form/components/RyftPayment/RyftPayment.d.ts.map +1 -1
  85. package/dist/sales/payment-form/components/RyftPayment/RyftPayment.js +1 -3
  86. package/dist/setting/dashboard/payments/payments-modal/PaymentsModal.d.ts.map +1 -1
  87. package/dist/setting/dashboard/snippets/card/SnippetCard.d.ts.map +1 -1
  88. package/dist/setting/dashboard/snippets/card/SnippetCard.js +4 -4
  89. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  90. package/dist/snippet/snippet-template/preview/Preview.js +14 -21
  91. package/dist/static/RestrictedAccess.d.ts.map +1 -1
  92. package/dist/static/RestrictedAccess.js +3 -2
  93. package/dist/static/index.js +1 -1
  94. package/dist/striped-static-table/StripedStaticTable.js +0 -1
  95. package/dist/table/ReactTableHelperComponent.d.ts.map +1 -1
  96. package/dist/table/ReactTableHelperComponent.js +3 -3
  97. package/dist/table/TableHelperComponent.d.ts.map +1 -1
  98. package/dist/table/TableHelperComponent.js +3 -3
  99. package/dist/venue-map-sets/card/VenueMapSetCard.d.ts.map +1 -1
  100. package/dist/venue-map-sets/card/VenueMapSetCard.js +4 -3
  101. package/dist/zone/card/ZoneCard.d.ts.map +1 -1
  102. package/dist/zone/card/ZoneCard.js +4 -3
  103. package/package.json +23 -20
  104. package/src/affiliate/form/AffiliateForm.tsx +4 -2
  105. package/src/auth/AccessDenied/AccessDenied.tsx +4 -3
  106. package/src/auth/Authorizer.tsx +11 -6
  107. package/src/auth/ChangePassword/ChangePasswordComponent.tsx +21 -26
  108. package/src/auth/Layout/AuthNavComponent.tsx +2 -3
  109. package/src/auth/Layout/UserNavDropDown.tsx +6 -7
  110. package/src/auth/Login/LoginComponent.tsx +42 -46
  111. package/src/auth/Logout/Logout.stories.tsx +12 -14
  112. package/src/auth/Logout/Logout.tsx +4 -3
  113. package/src/auth/Register/RegisterComponent.tsx +35 -41
  114. package/src/auth/ResetPassword/ResetPasswordComponent.tsx +16 -20
  115. package/src/auth/Social/SocialCallbackComponent.tsx +4 -4
  116. package/src/custom-fields/field-set/providers/CustomFieldSetsProvider.tsx +2 -2
  117. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -0
  118. package/src/events/event-card/EventCard.tsx +10 -8
  119. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -0
  120. package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +2 -2
  121. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +13 -8
  122. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +12 -4
  123. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
  124. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +18 -20
  125. package/src/iframe/event/event-navigation-footer/EventNavigationFooter.tsx +3 -2
  126. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -5
  127. package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.tsx +3 -3
  128. package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +3 -3
  129. package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +1 -1
  130. package/src/iframe/payment/payment-page/PaymentPage.tsx +1 -1
  131. package/src/iframe/ryft/RyftPaymentForm.tsx +2 -5
  132. package/src/iframe/ryft/utils/ryft-form.ts +1 -1
  133. package/src/index.ts +1 -0
  134. package/src/modals/dialog/Dialog.tsx +35 -36
  135. package/src/modals/dialog/DialogContext.tsx +8 -2
  136. package/src/notification/email-template/card/EmailTemplateCard.tsx +0 -2
  137. package/src/pages/PrivacyComponent.tsx +318 -0
  138. package/src/pages/TermsComponent.tsx +306 -0
  139. package/src/pages/index.ts +2 -0
  140. package/src/product-set/card/ProductSetCard.tsx +3 -2
  141. package/src/product-set/form/ProductSetForm.tsx +2 -1
  142. package/src/product-set/utils/index.ts +15 -14
  143. package/src/recurrence-input/RecurrenceInput.tsx +4 -3
  144. package/src/sales/payment-form/components/RyftPayment/RyftPayment.tsx +1 -3
  145. package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +1 -0
  146. package/src/setting/dashboard/snippets/card/SnippetCard.tsx +4 -3
  147. package/src/snippet/snippet-template/preview/Preview.tsx +6 -9
  148. package/src/static/RestrictedAccess.tsx +3 -6
  149. package/src/table/ReactTableHelperComponent.tsx +3 -5
  150. package/src/table/TableHelperComponent.tsx +3 -3
  151. package/src/venue-map-sets/card/VenueMapSetCard.tsx +4 -3
  152. package/src/zone/card/ZoneCard.tsx +4 -3
  153. package/yarn.lock +474 -542
@@ -2,14 +2,13 @@ import { EmailTemplate } from '@licklist/core/dist/DataMapper/Notification/Email
2
2
  import { SmsTemplate } from '@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper'
3
3
  import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper'
4
4
  import { convertToTypeaheadOptions } from 'src/sales/coupon/utils'
5
- import { TFunction } from 'react-i18next'
5
+ import { TFunction } from 'i18next'
6
6
  import { UseFormSetError } from 'react-hook-form'
7
7
  import { checkIfZoneCategory } from '@licklist/plugins'
8
8
  import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper'
9
9
  import { TemplateItem } from '../control/ProductSetControl'
10
10
  import { ProductSetFormValues } from '../form/ProductSetForm'
11
11
 
12
-
13
12
  interface CheckAvailableTimesErrors {
14
13
  values: ProductSetFormValues
15
14
  setError: UseFormSetError<ProductSetFormValues>
@@ -61,21 +60,23 @@ export const getFilteredTemplates = (
61
60
  }))
62
61
  }
63
62
 
64
- export const updateModifiersSetAtProductSetForm = (data: ProductSetFormValues) => ({
63
+ export const updateModifiersSetAtProductSetForm = (
64
+ data: ProductSetFormValues,
65
+ ) => ({
65
66
  ...data,
66
- steps: data.steps.map(step => ({
67
- ...step,
68
- productCategories: step.productCategories.map(category => ({
69
- ...category,
70
- products: category.products.map(product => ({
71
- ...product,
72
- modifiersSet: product?.modifiersSet
73
- ? convertToTypeaheadOptions(product.modifiersSet as ModifierSet[])
74
- : [],
75
- })),
67
+ steps: data.steps.map((step) => ({
68
+ ...step,
69
+ productCategories: step.productCategories.map((category) => ({
70
+ ...category,
71
+ products: category.products.map((product) => ({
72
+ ...product,
73
+ modifiersSet: product?.modifiersSet
74
+ ? convertToTypeaheadOptions(product.modifiersSet as ModifierSet[])
75
+ : [],
76
76
  })),
77
+ })),
77
78
  })),
78
- });
79
+ })
79
80
 
80
81
  export const checkAvailableTimesErrors = ({
81
82
  values,
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable prefer-destructuring */
2
2
  /* eslint-disable react-hooks/exhaustive-deps */
3
3
  import { DateTime } from 'luxon'
4
- import { useEffect, useReducer, useState } from 'react'
4
+ import { useEffect, useReducer } from 'react'
5
5
  import RRule, { Frequency, Weekday } from 'rrule'
6
6
  import RecurrenceEndInput, { defaultOccurrences } from './RecurrenceEndInput'
7
7
  import RecurrenceIntervalAndFrequencyInput from './RecurrenceIntervalAndFrequencyInput'
@@ -37,7 +37,7 @@ export function RecurrenceInput({
37
37
 
38
38
  useEffect(
39
39
  // TODO: unhardcode timezone
40
- () =>
40
+ () => {
41
41
  onChange(
42
42
  RRule.optionsToString({
43
43
  freq: state.freq,
@@ -47,7 +47,8 @@ export function RecurrenceInput({
47
47
  tzid: 'Europe/London',
48
48
  ...state,
49
49
  }).replace('RRULE:', ''),
50
- ),
50
+ )
51
+ },
51
52
  [state],
52
53
  )
53
54
 
@@ -1,6 +1,5 @@
1
1
  import { useTranslation } from 'react-i18next'
2
2
  import { Alert, Button } from 'react-bootstrap'
3
- import { useHistory } from 'react-router-dom'
4
3
  import { BlockLoader } from '../../../../static'
5
4
 
6
5
  export type RyftPaymentProps = {
@@ -15,7 +14,6 @@ export const RyftPayment = ({
15
14
  ryftInitFailure = false,
16
15
  }: RyftPaymentProps) => {
17
16
  const { t } = useTranslation(['Design', 'App'])
18
- const history = useHistory()
19
17
 
20
18
  return (
21
19
  <>
@@ -46,7 +44,7 @@ export const RyftPayment = ({
46
44
  <Button
47
45
  variant='primary'
48
46
  onClick={() => {
49
- history.go(0)
47
+ window.location.reload()
50
48
  }}
51
49
  >
52
50
  {t('refresh')}
@@ -25,6 +25,7 @@ export function PaymentsModal({
25
25
 
26
26
  return (
27
27
  <Modal show={isVisible} onHide={onHide} centered>
28
+ {/* @ts-ignore */}
28
29
  <Modal.Header closeButton>
29
30
  <Modal.Title>{t('Design:setEmail')}</Modal.Title>
30
31
  </Modal.Header>
@@ -1,11 +1,11 @@
1
1
  import { useState } from 'react'
2
2
  import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission'
3
3
  import { useTranslation } from 'react-i18next'
4
- import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
5
4
  import clsx from 'clsx'
6
5
  import { OverlayTrigger, Popover, ListGroup } from 'react-bootstrap'
7
6
  import { useId } from '@react-aria/utils'
8
7
  import { FaEllipsisH, FaEye, FaTrashAlt } from 'react-icons/fa'
8
+ import { useNavigate } from 'react-router-dom'
9
9
  import { MenuButton } from '../../../../table'
10
10
  import { ConfirmModal } from '../../../../modals'
11
11
 
@@ -26,6 +26,7 @@ export function SnippetCard({
26
26
  const { t } = useTranslation('Design')
27
27
  const popoverId = useId()
28
28
  const [isOverlayVisibile, setIsOverlayVisible] = useState(false)
29
+ const navigate = useNavigate()
29
30
 
30
31
  const isDeletingAllowed = hasPermission && !isDefault
31
32
 
@@ -34,8 +35,8 @@ export function SnippetCard({
34
35
  className='border-0 product-set-card-wrapper w-100 pb-0'
35
36
  role='button'
36
37
  tabIndex={0}
37
- onClick={() => RouteService.redirectTo(href)}
38
- onKeyUp={() => RouteService.redirectTo(href)}
38
+ onClick={() => navigate(href)}
39
+ onKeyUp={() => navigate(href)}
39
40
  >
40
41
  <div className='product-set-card'>
41
42
  <div className='product-set-card-link'>{name}</div>
@@ -1,6 +1,5 @@
1
1
  import { useContext, useState } from 'react'
2
2
  import { useTranslation } from 'react-i18next'
3
- import { MemoryRouter } from 'react-router-dom'
4
3
  import { Button } from 'react-bootstrap'
5
4
  import {
6
5
  SNIPPET_TEMPLATE_TYPE_VENUE_MAP,
@@ -79,14 +78,12 @@ export function Preview({
79
78
  <div className='mt-5 pt-5 external-header'>
80
79
  <PageHeader showCloseButton showBackButton>
81
80
  <Timer timer={600} />
82
- <MemoryRouter initialEntries={['/step1', '/step2']}>
83
- <NavigationSteps
84
- steps={[
85
- { pathname: '/step1', key: '/step1', name: 'Burger' },
86
- { pathname: '/step2', key: '/step2', name: 'Cheese' },
87
- ]}
88
- />
89
- </MemoryRouter>
81
+ <NavigationSteps
82
+ steps={[
83
+ { pathname: '/step1', key: '/step1', name: 'Burger' },
84
+ { pathname: '/step2', key: '/step2', name: 'Cheese' },
85
+ ]}
86
+ />
90
87
  </PageHeader>
91
88
  </div>
92
89
  </div>
@@ -1,18 +1,15 @@
1
1
  import { Button } from 'react-bootstrap'
2
- import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
3
2
  import { useTranslation } from 'react-i18next'
4
3
  import { FaArrowLeft } from 'react-icons/fa'
4
+ import { useNavigate } from 'react-router-dom'
5
5
 
6
6
  function RestrictedAccess() {
7
7
  const { t } = useTranslation('Design')
8
+ const navigate = useNavigate()
8
9
 
9
10
  return (
10
11
  <>
11
- <Button
12
- className='mt-3 ml-3'
13
- variant='link'
14
- onClick={() => RouteService.goBack()}
15
- >
12
+ <Button className='mt-3 ml-3' variant='link' onClick={() => navigate(-1)}>
16
13
  <FaArrowLeft size={25} />
17
14
  </Button>
18
15
  <div className='container d-flex justify-content-center pt-5'>
@@ -7,7 +7,7 @@ import {
7
7
  ReactElement,
8
8
  } from 'react'
9
9
  import { Col, Row, Table } from 'react-bootstrap'
10
- import { useLocation } from 'react-router-dom'
10
+ import { useLocation, useNavigate } from 'react-router-dom'
11
11
  import { isEqual } from 'lodash'
12
12
  import clsx from 'clsx'
13
13
  import {
@@ -15,7 +15,6 @@ import {
15
15
  ColumnDefResolved,
16
16
  getCoreRowModel,
17
17
  } from '@tanstack/react-table'
18
- import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
19
18
  import TableService from '@licklist/plugins/dist/services/Table/TableService'
20
19
  import { LoaderIndicator } from '../static/loader/LoaderIndicator'
21
20
  import { FilterHelperComponent } from './FilterHelperComponent'
@@ -74,6 +73,7 @@ function WrappedReactTableHelperComponent<T extends object>(
74
73
  } = props
75
74
 
76
75
  const { pathname } = useLocation()
76
+ const navigate = useNavigate()
77
77
 
78
78
  const {
79
79
  sortKey,
@@ -167,9 +167,7 @@ function WrappedReactTableHelperComponent<T extends object>(
167
167
  ...externalFilters,
168
168
  })
169
169
 
170
- RouteService.redirectTo(
171
- [pathname, nextUrlSearchParams.toString()].join('?'),
172
- )
170
+ navigate([pathname, nextUrlSearchParams.toString()].join('?'))
173
171
  },
174
172
  // eslint-disable-next-line react-hooks/exhaustive-deps
175
173
  [pathname, options, externalFilters],
@@ -1,10 +1,9 @@
1
1
  /* eslint-disable @typescript-eslint/ban-types */
2
2
  import { SetStateAction, useEffect, useState } from 'react'
3
3
  import { Col, Row, Table } from 'react-bootstrap'
4
- import { useLocation } from 'react-router-dom'
4
+ import { useLocation, useNavigate } from 'react-router-dom'
5
5
  import { isEqual } from 'lodash'
6
6
  import useQuery from '@licklist/plugins/dist/hooks/Query/useQuery'
7
- import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
8
7
  import TableService from '@licklist/plugins/dist/services/Table/TableService'
9
8
  import ILengthAwarePaginator from '@licklist/plugins/dist/types/services/Table/ILengthAwarePaginator'
10
9
  import ITableHeader from '@licklist/plugins/dist/types/services/Table/ITableHeader'
@@ -68,6 +67,7 @@ function TableHelperComponent(props: TableHelperComponentProps) {
68
67
 
69
68
  const query = useQuery()
70
69
  const { pathname } = useLocation()
70
+ const navigate = useNavigate()
71
71
 
72
72
  const page = Number(getFilterOptionsValue(query, initialOptions, 'page'))
73
73
  const perPage = Number(
@@ -113,7 +113,7 @@ function TableHelperComponent(props: TableHelperComponentProps) {
113
113
  onRefreshFn(options)
114
114
  }
115
115
 
116
- RouteService.redirectTo(
116
+ navigate(
117
117
  [
118
118
  pathname,
119
119
  [
@@ -4,8 +4,8 @@ import { useId } from '@react-aria/utils'
4
4
  import { useTranslation } from 'react-i18next'
5
5
  import clsx from 'clsx'
6
6
  import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission'
7
- import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
8
7
  import { FaEye, FaEllipsisH, FaTrashAlt } from 'react-icons/fa'
8
+ import { useNavigate } from 'react-router-dom'
9
9
  import { MenuButton } from '../../table/MenuButton'
10
10
  import { ConfirmModal } from '../../modals'
11
11
 
@@ -26,14 +26,15 @@ export function VenueMapSetCard({
26
26
  const { t } = useTranslation('Design')
27
27
  const popoverId = useId()
28
28
  const [isOverlayVisibile, setIsOverlayVisible] = useState(false)
29
+ const navigate = useNavigate()
29
30
 
30
31
  return (
31
32
  <div
32
33
  role='button'
33
34
  tabIndex={0}
34
35
  className='border-0 venue-map-set-card-wrapper w-100 pb-0'
35
- onClick={() => RouteService.redirectTo(href)}
36
- onKeyUp={() => RouteService.redirectTo(href)}
36
+ onClick={() => navigate(href)}
37
+ onKeyUp={() => navigate(href)}
37
38
  >
38
39
  <div className={clsx('venue-map-set-card', className)}>
39
40
  <div className='venue-map-set-card-link'>{name}</div>
@@ -4,8 +4,8 @@ import { useTranslation } from 'react-i18next'
4
4
  import clsx from 'clsx'
5
5
  import { useId } from '@react-aria/utils'
6
6
  import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission'
7
- import RouteService from '@licklist/plugins/dist/services/Route/RouteService'
8
7
  import { FaEllipsisH, FaEye, FaTrashAlt } from 'react-icons/fa'
8
+ import { useNavigate } from 'react-router-dom'
9
9
  import { ConfirmModal } from '../../modals'
10
10
  import { MenuButton } from '../../table/MenuButton'
11
11
 
@@ -27,14 +27,15 @@ export function ZoneCard({
27
27
  const popoverId = useId()
28
28
  const ZoneCardClasses = `zone-card ${className}`
29
29
  const [isOverlayVisibile, setIsOverlayVisible] = useState(false)
30
+ const navigate = useNavigate()
30
31
 
31
32
  return (
32
33
  <div
33
34
  role='button'
34
35
  tabIndex={0}
35
36
  className='border-0 zone-card-wrapper w-100 pb-0'
36
- onClick={() => RouteService.redirectTo(href)}
37
- onKeyUp={() => RouteService.redirectTo(href)}
37
+ onClick={() => navigate(href)}
38
+ onKeyUp={() => navigate(href)}
38
39
  >
39
40
  <div className={ZoneCardClasses}>
40
41
  <div className='zone-card-link'>{name}</div>