Change import from next/router to use wildcard (#234)
This commit is contained in:
parent
7c6c164a92
commit
11b793be94
2 changed files with 8 additions and 1 deletions
5
.changeset/selfish-pigs-film.md
Normal file
5
.changeset/selfish-pigs-film.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"@saleor/app-sdk": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Changed import type from next/router, that fixes Next 13.3.1 build
|
|
@ -1,12 +1,14 @@
|
||||||
/**
|
/**
|
||||||
* Use .js extension to avoid broken builds with ESM
|
* Use .js extension to avoid broken builds with ESM
|
||||||
*/
|
*/
|
||||||
import { useRouter } from "next/router.js";
|
import * as NextRouter from "next/router.js";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
|
||||||
import { actions } from "../actions";
|
import { actions } from "../actions";
|
||||||
import { useAppBridge } from "../app-bridge-provider";
|
import { useAppBridge } from "../app-bridge-provider";
|
||||||
|
|
||||||
|
const { useRouter } = NextRouter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Synchronizes app inner state (inside iframe) with dashboard routing, so app's route can be restored after refresh
|
* Synchronizes app inner state (inside iframe) with dashboard routing, so app's route can be restored after refresh
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue