File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ hidden: false
1616
1717</text-box >
1818
19- <ab-study id =" ohjelmointi-20-scale-vs-mcq " >
19+ <ab-study id =" 1a2faee2-7287-4277-ac4a-329220042a27 " >
2020
2121<only-for-ab-group group =" 1 " >
2222
Original file line number Diff line number Diff line change 11import React , { Fragment } from "react"
22import Button from "./Button"
3+ import { Button as MaterialButton } from "@material-ui/core"
34import { signOut , getCachedUserDetails } from "../services/moocfi"
45import LoginStateContext , {
56 withLoginStateContext ,
@@ -14,6 +15,11 @@ const StyledIcon = styled(FontAwesomeIcon)`
1415 margin-right: 0.5rem;
1516`
1617
18+ const StyledButton = styled ( MaterialButton ) `
19+ margin: 1rem 0.5rem !important;
20+ padding: 1.1rem 1rem !important;
21+ `
22+
1723class LoginControls extends React . Component {
1824 static contextType = LoginStateContext
1925
@@ -48,7 +54,9 @@ class LoginControls extends React.Component {
4854 < StyledIcon icon = { profileIcon } />
4955 { this . state . name }
5056 </ 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 >
5260 </ Fragment >
5361 ) : (
5462 < Fragment >
Original file line number Diff line number Diff line change 11import axios from "axios"
22import { accessToken } from "./moocfi"
33
4- const BASE_URL = "https://ab-studio.testmycode.io "
4+ const BASE_URL = "https://www.mooc.fi "
55
66export 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+ } )
1013 return res . data
1114}
You can’t perform that action at this time.
0 commit comments