diff --git a/.pnp.cjs b/.pnp.cjs index 9be1dbb1..ea77287d 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -93,7 +93,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["next-auth", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:4.22.1"],\ ["next-router-mock", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:0.9.7"],\ ["next-sitemap", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:4.1.8"],\ - ["open-external-browser", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.0.0"],\ + ["open-external-browser", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.1.0"],\ ["postcss", "npm:8.4.31"],\ ["postcss-styled-syntax", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:0.5.0"],\ ["prettier", "npm:2.8.8"],\ @@ -190,7 +190,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["next-auth", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:4.22.1"],\ ["next-router-mock", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:0.9.7"],\ ["next-sitemap", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:4.1.8"],\ - ["open-external-browser", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.0.0"],\ + ["open-external-browser", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.1.0"],\ ["postcss", "npm:8.4.31"],\ ["postcss-styled-syntax", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:0.5.0"],\ ["prettier", "npm:2.8.8"],\ @@ -18774,17 +18774,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["open-external-browser", [\ - ["npm:1.0.0", {\ - "packageLocation": "./.yarn/cache/open-external-browser-npm-1.0.0-de6ae7f115-e2c387d0a8.zip/node_modules/open-external-browser/",\ + ["npm:1.1.0", {\ + "packageLocation": "./.yarn/cache/open-external-browser-npm-1.1.0-c0b59e5d40-a7debc62c3.zip/node_modules/open-external-browser/",\ "packageDependencies": [\ - ["open-external-browser", "npm:1.0.0"]\ + ["open-external-browser", "npm:1.1.0"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.0.0", {\ - "packageLocation": "./.yarn/__virtual__/open-external-browser-virtual-77c1fe884e/0/cache/open-external-browser-npm-1.0.0-de6ae7f115-e2c387d0a8.zip/node_modules/open-external-browser/",\ + ["virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.1.0", {\ + "packageLocation": "./.yarn/__virtual__/open-external-browser-virtual-83cdb60f13/0/cache/open-external-browser-npm-1.1.0-c0b59e5d40-a7debc62c3.zip/node_modules/open-external-browser/",\ "packageDependencies": [\ - ["open-external-browser", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.0.0"],\ + ["open-external-browser", "virtual:f05aa4e4719fd537ba4da07d5553d5af64c7f1fdd299ee20cc573ded517ff6989f4f9dcaf607519cf1ea35a7fc8484d64ed69e9ea31b5a59302d59cb203ae9e8#npm:1.1.0"],\ ["@types/react", "npm:18.0.35"],\ ["@types/react-dom", "npm:18.0.11"],\ ["react", "npm:18.2.0"],\ diff --git a/.yarn/cache/open-external-browser-npm-1.0.0-de6ae7f115-e2c387d0a8.zip b/.yarn/cache/open-external-browser-npm-1.0.0-de6ae7f115-e2c387d0a8.zip deleted file mode 100644 index f22442d7..00000000 Binary files a/.yarn/cache/open-external-browser-npm-1.0.0-de6ae7f115-e2c387d0a8.zip and /dev/null differ diff --git a/.yarn/cache/open-external-browser-npm-1.1.0-c0b59e5d40-a7debc62c3.zip b/.yarn/cache/open-external-browser-npm-1.1.0-c0b59e5d40-a7debc62c3.zip new file mode 100644 index 00000000..0921265b Binary files /dev/null and b/.yarn/cache/open-external-browser-npm-1.1.0-c0b59e5d40-a7debc62c3.zip differ diff --git a/package.json b/package.json index 065f6f92..8a51406e 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "mixpanel-browser": "^2.46.0", "next": "13.5.6", "next-auth": "^4.22.1", - "open-external-browser": "^1.0.0", + "open-external-browser": "^1.1.0", "react": "18.2.0", "react-dom": "18.2.0", "react-hotjar": "^6.1.0", diff --git a/src/pages/_app.page.tsx b/src/pages/_app.page.tsx index 28800e3d..13bce2d6 100644 --- a/src/pages/_app.page.tsx +++ b/src/pages/_app.page.tsx @@ -1,5 +1,6 @@ import { useState } from 'react'; import type { AppProps } from 'next/app'; +import { useRouter } from 'next/router'; import { SessionProvider } from 'next-auth/react'; import * as ChannelTalk from '@channel.io/channel-web-sdk-loader'; import { css, type Theme, ThemeProvider } from '@emotion/react'; @@ -45,7 +46,8 @@ export default function App({ Component, pageProps }: AppPropsWithLayout) { }), ); - useOpenExternalBrowser({ where: 'all' }); + const router = useRouter(); + useOpenExternalBrowser({ where: 'all', onOpen: () => router.push('/') }); return ( diff --git a/yarn.lock b/yarn.lock index dc606a41..16de7fa1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -74,7 +74,7 @@ __metadata: next-auth: ^4.22.1 next-router-mock: ^0.9.3 next-sitemap: ^4.1.3 - open-external-browser: ^1.0.0 + open-external-browser: ^1.1.0 postcss: ^8.4.31 postcss-styled-syntax: ^0.5.0 prettier: ^2.8.7 @@ -13764,13 +13764,13 @@ __metadata: languageName: node linkType: hard -"open-external-browser@npm:^1.0.0": - version: 1.0.0 - resolution: "open-external-browser@npm:1.0.0" +"open-external-browser@npm:^1.1.0": + version: 1.1.0 + resolution: "open-external-browser@npm:1.1.0" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: e2c387d0a89b856e3a97daacbb47b38c242208300860c8b34190c19422dd7ec315181658bffb1af4072534853a7a1154631fdf008266dab91c7fc00aa6188836 + checksum: a7debc62c3d4cb17e99044c9df94ca5c37a6a1d70f1a5bb93d2400629ee8cdee18da4a2729365ea687affafefae03ec60f75e423c4d837f26fff3e0ae7417689 languageName: node linkType: hard