Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
detect internal as client, revert changes
- Loading branch information
Showing
11 changed files
with
40 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { useRouter, withRouter } from 'next/router' | ||
import IsNull from './IsNull' | ||
import IsNull from './is-null' | ||
import ServerRouter from './server-router' | ||
import ClientRouter from './client-router' | ||
|
||
function ServerRouter({ router: withRouter }) { | ||
function SharedRouter({ router: withRouter }) { | ||
const router = useRouter() | ||
|
||
return ( | ||
<> | ||
<IsNull value={withRouter} /> | ||
<IsNull value={router} /> | ||
<ServerRouter /> | ||
<ClientRouter /> | ||
</> | ||
) | ||
} | ||
|
||
export default withRouter(ServerRouter) | ||
export default withRouter(SharedRouter) |
2 changes: 1 addition & 1 deletion
2
...p-dir/app/app/old-router/Router.client.js → ...p-dir/app/app/old-router/client-router.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useRouter, withRouter } from 'next/router' | ||
import IsNull from './is-null' | ||
|
||
function ServerRouter({ router: withRouter }) { | ||
const router = useRouter() | ||
|
||
return ( | ||
<> | ||
<IsNull value={withRouter} /> | ||
<IsNull value={router} /> | ||
</> | ||
) | ||
} | ||
|
||
export default withRouter(ServerRouter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters