File tree 9 files changed +45
-34
lines changed
ui/react-ui/src/components
9 files changed +45
-34
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # deploy to blob storage =>
2
+ name : Build and deploy the app to the Azure Blob Storage
3
+
4
+ on :
5
+ push :
6
+ branches :
7
+ - development
8
+ env :
9
+ AZURE_WEBAPP_PACKAGE_PATH : ui/react-ui
10
+ NODE_VERSION : ' 10.x'
11
+
12
+ jobs :
13
+ build-and-deploy :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@main
17
+ - name : Set up Node.js version
18
+ uses : actions/setup-node@v1
19
+ with :
20
+ node-version : ${{env.NODE_VERSION}}
21
+ - name : npm install and build
22
+ run : |
23
+ cd ${{env.AZURE_WEBAPP_PACKAGE_PATH}}
24
+ npm install
25
+ npm run build
26
+ - name : Upload To Azure Blob Storage
27
+ uses :
bacongobbler/[email protected]
28
+ with :
29
+ source_dir : ${{env.AZURE_WEBAPP_PACKAGE_PATH}}/build
30
+ container_name : $web
31
+ connection_string : ${{secrets.BLOB_STORAGE_CONNECTION_STRING}}
Original file line number Diff line number Diff line change 1
1
.App {
2
- /* text-align: center; */
3
- /* height: 100vh; */
4
2
padding-top : 2rem ;
5
3
padding-bottom : 2rem ;
6
4
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ let UserSingleTask = () => {
10
10
console . log ( userId , taskId )
11
11
12
12
useEffect ( ( ) => {
13
- fetch ( `https://nsc-functionsapp-team1 .azurewebsites.net/api/users/${ userId } /tasks/${ taskId } ` )
13
+ fetch ( `https://nsc-fun-dev-usw2-thursday .azurewebsites.net/api/users/${ userId } /tasks/${ taskId } ` )
14
14
. then ( response => response . json ( ) )
15
15
. then ( data => setUserSingleTask ( data ) )
16
16
. catch ( ( error ) => console . error ( error ) )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ var UserTasks = () => {
11
11
useEffect ( ( ) => {
12
12
setUserTasks ( [ 'loading' ] ) ;
13
13
14
- fetch ( `https://nsc-functionsapp-team1 .azurewebsites.net/api/users/${ userId } /tasks?` )
14
+ fetch ( `https://nsc-fun-dev-usw2-thursday .azurewebsites.net/api/users/${ userId } /tasks?` )
15
15
. then ( response => response . json ( ) )
16
16
. then ( data => setUserTasks ( data ) )
17
17
. catch ( ( error ) => console . error ( error ) )
Original file line number Diff line number Diff line change @@ -10,9 +10,15 @@ var User = () => {
10
10
var { userId} = useParams ( ) ;
11
11
12
12
useEffect ( ( ) => {
13
- fetch ( `https://nsc-functionsapp-team1 .azurewebsites.net/api/users/${ userId } ?` )
13
+ fetch ( `https://nsc-fun-dev-usw2-thursday .azurewebsites.net/api/users/${ userId } ?` )
14
14
. then ( response => response . json ( ) )
15
- . then ( data => setUser ( data ) )
15
+ . then ( data => {
16
+ var updatedData = { } ;
17
+
18
+ if ( Object . keys ( data ) . length > 0 ) Object . keys ( data ) . forEach ( key => updatedData [ key . toLowerCase ( ) ] = data [ key ] ) ;
19
+
20
+ setUser ( updatedData ) ;
21
+ } )
16
22
. catch ( ( error ) => console . error ( error ) )
17
23
18
24
// eslint-disable-next-line react-hooks/exhaustive-deps
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export default class Users extends Component {
11
11
} ;
12
12
13
13
async componentDidMount ( ) {
14
- const url = 'https://nsc-functionsapp-team1 .azurewebsites.net/api/users' ;
14
+ const url = 'https://nsc-fun-dev-usw2-thursday .azurewebsites.net/api/users' ;
15
15
const response = await fetch ( url ) ;
16
16
const usersData = await response . json ( ) ;
17
17
this . setState ( {
You can’t perform that action at this time.
0 commit comments