File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
libs/remix-ui/git/src/components/github Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import React from 'react'
3
3
import './index.css'
4
4
import { ThemeModule } from './app/tabs/theme-module'
5
5
import { Preload } from './app/components/preload'
6
- import { BrowserRouter , Routes , Route } from 'react-router-dom'
7
6
import { GitHubPopupCallback } from './app/pages/GitHubPopupCallback'
8
7
import Config from './config'
9
8
import { Registry } from '@remix-project/remix-lib'
@@ -23,13 +22,13 @@ import { createRoot } from 'react-dom/client'
23
22
const container = document . getElementById ( 'root' ) ;
24
23
const root = createRoot ( container )
25
24
if ( container ) {
26
- root . render (
27
- < BrowserRouter >
28
- < Routes >
29
- < Route path = "/auth/github/callback" element = { < GitHubPopupCallback /> } />
30
- < Route path = "*" element = { < Preload root = { root } /> } />
31
- </ Routes >
32
- </ BrowserRouter >
33
- )
25
+ if ( window . location . hash . includes ( 'source=github' ) ) {
26
+ root . render (
27
+ < GitHubPopupCallback / >
28
+ )
29
+ } else {
30
+ root . render (
31
+ < Preload root = { root } /> )
32
+ }
34
33
}
35
34
} ) ( )
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export const GetDeviceCode = () => {
49
49
}
50
50
51
51
const clientId = await getClientId ( )
52
- const redirectUri = `${ window . location . origin } /auth/ github/callback `
52
+ const redirectUri = `${ window . location . origin } /?source= github`
53
53
const scope = 'repo gist user:email read:user'
54
54
55
55
const url = `https://github.com/login/oauth/authorize?client_id=${ clientId } &redirect_uri=${ encodeURIComponent ( redirectUri ) } &scope=${ encodeURIComponent ( scope ) } &response_type=code`
You can’t perform that action at this time.
0 commit comments