@treely/strapi-slices 7.16.0 → 7.16.2
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/dist/__mocks__/next/router.d.ts +1 -0
- package/dist/strapi-slices.cjs.development.js +2 -2
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +2 -2
- package/dist/strapi-slices.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/slices/Redirect/Rediect.test.tsx +4 -7
- package/src/slices/Redirect/Redirect.tsx +3 -2
|
@@ -21,7 +21,6 @@ import { Formik, Form, Field } from 'formik';
|
|
|
21
21
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
22
22
|
import AutoScroll from 'embla-carousel-auto-scroll';
|
|
23
23
|
import useSWRInfinite from 'swr/infinite';
|
|
24
|
-
import { redirect, RedirectType } from 'next/navigation';
|
|
25
24
|
|
|
26
25
|
function _OverloadYield(e, d) {
|
|
27
26
|
this.v = e, this.k = d;
|
|
@@ -7154,9 +7153,10 @@ var Events = function Events(_ref) {
|
|
|
7154
7153
|
|
|
7155
7154
|
var Redirect = function Redirect(_ref) {
|
|
7156
7155
|
var slice = _ref.slice;
|
|
7156
|
+
var router = useRouter();
|
|
7157
7157
|
useEffect(function () {
|
|
7158
7158
|
// When using `replace`, the current browser history entry will be replaced
|
|
7159
|
-
|
|
7159
|
+
router.replace(slice.url);
|
|
7160
7160
|
}, [slice.url]);
|
|
7161
7161
|
return React.createElement(React.Fragment, null);
|
|
7162
7162
|
};
|