File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ hidden: false
16
16
17
17
</text-box >
18
18
19
- <ab-study id =" ohjelmointi-20-scale-vs-mcq " >
19
+ <ab-study id =" 1a2faee2-7287-4277-ac4a-329220042a27 " >
20
20
21
21
<only-for-ab-group group =" 1 " >
22
22
Original file line number Diff line number Diff line change 1
1
import React , { Fragment } from "react"
2
2
import Button from "./Button"
3
+ import { Button as MaterialButton } from "@material-ui/core"
3
4
import { signOut , getCachedUserDetails } from "../services/moocfi"
4
5
import LoginStateContext , {
5
6
withLoginStateContext ,
@@ -14,6 +15,11 @@ const StyledIcon = styled(FontAwesomeIcon)`
14
15
margin-right: 0.5rem;
15
16
`
16
17
18
+ const StyledButton = styled ( MaterialButton ) `
19
+ margin: 1rem 0.5rem !important;
20
+ padding: 1.1rem 1rem !important;
21
+ `
22
+
17
23
class LoginControls extends React . Component {
18
24
static contextType = LoginStateContext
19
25
@@ -48,7 +54,9 @@ class LoginControls extends React.Component {
48
54
< StyledIcon icon = { profileIcon } />
49
55
{ this . state . name }
50
56
</ Button >
51
- < Button onClick = { this . doSignOut } > { this . props . t ( "logout" ) } </ Button >
57
+ < StyledButton variant = "outlined" onClick = { this . doSignOut } >
58
+ { this . props . t ( "logout" ) }
59
+ </ StyledButton >
52
60
</ Fragment >
53
61
) : (
54
62
< Fragment >
Original file line number Diff line number Diff line change 1
1
import axios from "axios"
2
2
import { accessToken } from "./moocfi"
3
3
4
- const BASE_URL = "https://ab-studio.testmycode.io "
4
+ const BASE_URL = "https://www.mooc.fi "
5
5
6
6
export async function fetchAbGroup ( studyId ) {
7
- const res = await axios . get (
8
- `${ BASE_URL } /api/v0/ab_studies/${ studyId } /group?oauth_token=${ accessToken ( ) } ` ,
9
- )
7
+ const res = await axios . get ( `${ BASE_URL } /api/ab-enrollments/${ studyId } ` , {
8
+ headers : {
9
+ "Content-Type" : "application/json" ,
10
+ Authorization : `Bearer ${ accessToken ( ) } ` ,
11
+ } ,
12
+ } )
10
13
return res . data
11
14
}
You can’t perform that action at this time.
0 commit comments