Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

인앱 브라우저에서 외부 브라우저로 열릴 때, 인앱 브라우저 라우팅 #452

Merged
merged 2 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/pages/_app.page.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -45,7 +46,8 @@ export default function App({ Component, pageProps }: AppPropsWithLayout) {
}),
);

useOpenExternalBrowser({ where: 'all' });
const router = useRouter();
useOpenExternalBrowser({ where: 'all', onOpen: () => router.push('/') });

return (
<SessionProvider session={pageProps.session}>
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Loading