File tree Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Deploy pr mgt-chat
4+ name : Deploy mgt-chat sample app
55
66on :
77 push :
3636 cp samples/react-contoso/.env.sample samples/react-contoso/.env
3737 sed -i 's/REACT_APP_CLIENT_ID="00000000-0000-0000-0000-000000000000"/REACT_APP_CLIENT_ID="${{secrets.REACT_CONTOSO_CHAT}}"/g' samples/react-contoso/.env
3838 sed -i 's/REACT_APP_BACKEND_CLIENT_ID="00000000-0000-0000-0000-000000000000"/REACT_APP_BACKEND_CLIENT_ID="${{secrets.REACT_CONTOSO_CHAT_BACKEND}}"/g' samples/react-contoso/.env
39+ sed -i 's/REACT_APP_BASE_DIR="/"/REACT_APP_BASE_DIR="/next/mgt-chat""/g' samples/react-contoso/.env
3940
4041 - name : Build 🛠
4142 run : |
4748 with :
4849 branch : gh-pages
4950 folder : samples/react-contoso/build
50- target-folder : next/pr/ mgt-chat
51+ target-folder : next/mgt-chat
Original file line number Diff line number Diff line change 4343 clean-exclude : |
4444 pr
4545 v3
46+ mgt-chat
4647 token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ REACT_APP_SITE_NAME="Contoso Dashboard"
55REACT_APP_CLIENT_ID = " 00000000-0000-0000-0000-000000000000"
66REACT_APP_URL_AZURE_FUNCTION = " https://contoso.azurewebsites.net"
77REACT_APP_BACKEND_CLIENT_ID = " 00000000-0000-0000-0000-000000000000"
8+ REACT_APP_BASE_DIR = " /"
89
Original file line number Diff line number Diff line change 22 "name" : " react-contoso" ,
33 "version" : " 1.3.0" ,
44 "private" : true ,
5+ "homepage" : " ." ,
56 "dependencies" : {
67 "@fluentui/merge-styles" : " ^8.0.3" ,
78 "@fluentui/react" : " ^8.0.0" ,
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { HashRouter , Route , Switch } from 'react-router-dom' ;
2+ import { BrowserRouter , Route , Switch } from 'react-router-dom' ;
33import { Header } from './components/Header' ;
44import { SideNavigation } from './components/SideNavigation' ;
55import { HomePage } from './pages/HomePage' ;
@@ -67,7 +67,7 @@ export const Layout: React.FunctionComponent = theme => {
6767 return (
6868 < FluentProvider theme = { appContext . state . theme . fluentTheme } >
6969 < div className = { styles . page } >
70- < HashRouter >
70+ < BrowserRouter basename = { process . env . BASE_DIR ?? '/' } >
7171 < Header > </ Header >
7272 < div className = { styles . main } >
7373 < div
@@ -90,7 +90,7 @@ export const Layout: React.FunctionComponent = theme => {
9090 </ Switch >
9191 </ div >
9292 </ div >
93- </ HashRouter >
93+ </ BrowserRouter >
9494 </ div >
9595 </ FluentProvider >
9696 ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ brokerSettings.appId = process.env.REACT_APP_BACKEND_CLIENT_ID!;
2121Providers . globalProvider = new Msal2Provider ( {
2222 clientId : process . env . REACT_APP_CLIENT_ID ! ,
2323 loginType : LoginType . Redirect ,
24- redirectUri : window . location . protocol + '//' + window . location . host ,
2524 scopes : [
2625 'Bookmark.Read.All' ,
2726 'Calendars.Read' ,
You can’t perform that action at this time.
0 commit comments