create project
This commit is contained in:
12
kitabcitab/node_modules/next/dist/client/compat/router.d.ts
generated
vendored
Normal file
12
kitabcitab/node_modules/next/dist/client/compat/router.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { NextRouter } from '../router';
|
||||
/**
|
||||
* useRouter from `next/compat/router` is designed to assist developers
|
||||
* migrating from `pages/` to `app/`. Unlike `next/router`, this hook does not
|
||||
* throw when the `NextRouter` is not mounted, and instead returns `null`. The
|
||||
* more concrete return type here lets developers use this hook within
|
||||
* components that could be shared between both `app/` and `pages/` and handle
|
||||
* to the case where the router is not mounted.
|
||||
*
|
||||
* @returns The `NextRouter` instance if it's available, otherwise `null`.
|
||||
*/
|
||||
export declare function useRouter(): NextRouter | null;
|
||||
18
kitabcitab/node_modules/next/dist/client/compat/router.js
generated
vendored
Normal file
18
kitabcitab/node_modules/next/dist/client/compat/router.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.useRouter = useRouter;
|
||||
var _react = require("react");
|
||||
var _routerContext = require("../../shared/lib/router-context");
|
||||
function useRouter() {
|
||||
return (0, _react).useContext(_routerContext.RouterContext);
|
||||
}
|
||||
|
||||
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
||||
Object.defineProperty(exports.default, '__esModule', { value: true });
|
||||
Object.assign(exports.default, exports);
|
||||
module.exports = exports.default;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=router.js.map
|
||||
1
kitabcitab/node_modules/next/dist/client/compat/router.js.map
generated
vendored
Normal file
1
kitabcitab/node_modules/next/dist/client/compat/router.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../client/compat/router.ts"],"names":["useRouter","useContext","RouterContext"],"mappings":"AAAA;;;;QAcgBA,SAAS,GAATA,SAAS;AAdE,IAAA,MAAO,WAAP,OAAO,CAAA;AACJ,IAAA,cAAiC,WAAjC,iCAAiC,CAAA;AAaxD,SAASA,SAAS,GAAsB;IAC7C,OAAOC,CAAAA,GAAAA,MAAU,AAAe,CAAA,WAAf,CAACC,cAAa,cAAA,CAAC,CAAA;CACjC"}
|
||||
Reference in New Issue
Block a user