@rpcbase/client 0.15.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,11 @@ import Footer from "../Footer"
10
10
 
11
11
  import "./sign-in.scss"
12
12
 
13
- const SignIn = ({name, logo}) => {
13
+ const SignIn = ({
14
+ name,
15
+ logo,
16
+ onSuccessRedirect = "/dashboard"
17
+ }) => {
14
18
  const [isLoading, setIsLoading] = useState(false)
15
19
  const [errors, setErrors] = useState()
16
20
 
@@ -41,7 +45,7 @@ const SignIn = ({name, logo}) => {
41
45
  window.location = redirect
42
46
  return
43
47
  }
44
- window.location = "/workspaces"
48
+ window.location = onSuccessRedirect
45
49
 
46
50
  } else {
47
51
  setErrors(res.errors)
package/helpers/post.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /* @flow */
2
2
  import axios from "axios"
3
3
 
4
- import config from "config"
4
+ import env from "env"
5
5
 
6
- const {BASE_URL} = config
6
+ const {BASE_URL} = env
7
7
 
8
8
  const client = axios.create({
9
9
  withCredentials: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.15.0",
3
+ "version": "0.18.0",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 0"
6
6
  },
package/rpc_post.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /* @flow */
2
2
  import axios from "axios"
3
3
 
4
- import config from "config"
4
+ import env from "env"
5
5
 
6
- const {BASE_URL} = config
6
+ const {BASE_URL} = env
7
7
 
8
8
  const client = axios.create({
9
9
  withCredentials: true,