diff --git a/agents/components/Register.js b/agents/components/Register.js
index 8f3a25e..3a24a90 100644
--- a/agents/components/Register.js
+++ b/agents/components/Register.js
@@ -74,6 +74,7 @@ function LocalAuthenticationForm (props) {
/>
@@ -117,6 +118,7 @@ function Register (props) {
)
diff --git a/agents/containers/LogOut.js b/agents/containers/LogOut.js
new file mode 100644
index 0000000..c4e5df6
--- /dev/null
+++ b/agents/containers/LogOut.js
@@ -0,0 +1,19 @@
+import { connect as connectRedux } from 'react-redux'
+import { connect as connectFeathers } from 'feathers-action-react'
+import { flow } from 'lodash'
+import { push } from 'react-router-redux'
+
+import { authentication } from 'dogstack-agents/actions'
+const { logOut } = authentication
+
+import LogOut from '../components/LogOut'
+
+export default flow(
+ connectFeathers({
+ actions: { authentication: { logOut } }
+ }),
+ connectRedux(
+ null,
+ { push }
+ )
+)(SignOut)
diff --git a/agents/containers/Register.js b/agents/containers/Register.js
new file mode 100644
index 0000000..60415b8
--- /dev/null
+++ b/agents/containers/Register.js
@@ -0,0 +1,17 @@
+import { connect as connectRedux } from 'react-redux'
+import { connect as connectFeathers } from 'feathers-action-react'
+import { flow } from 'lodash'
+
+import { authentication } from 'dogstack-agents/actions'
+const { register } = authentication
+import { getRegisterProps } from 'dogstack-agents/getters'
+
+import Register from '../components/Register'
+
+export default flow(
+ connectFeathers({
+ selector: getRegisterProps,
+ actions: { authentication: { register } },
+ query: []
+ })
+)(Register)
diff --git a/app/components/layout.js b/app/components/layout.js
index 28ac223..0653164 100644
--- a/app/components/layout.js
+++ b/app/components/layout.js
@@ -9,7 +9,7 @@ import Nav from './nav'
const Container = createComponent(styles.container, 'div')
-export default function Layout (props) {
+function Layout (props) {
const { routes, navigationRoutes } = props
const pages = mapRoutePages(routes)
@@ -34,3 +34,16 @@ const mapRoutePages = map(route => {
)
})
+
+// TODO move this to some config for dogstack
+import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
+import { IntlProvider } from 'react-intl'
+export default (props) => {
+ return (
+
+
+
+
+
+ )
+}
diff --git a/config/default.js b/config/default.js
index f303949..92c71d4 100644
--- a/config/default.js
+++ b/config/default.js
@@ -13,11 +13,11 @@ module.exports = {
},
auth: {
secret: 'CHANGE-ME',
- service: 'accounts',
- entity: 'account',
+ service: 'credentials',
+ entity: 'credential',
local: {
- service: 'accounts',
- entity: 'account'
+ service: 'credentials',
+ entity: 'credential'
}
}
}
diff --git a/package.json b/package.json
index 397c8e4..a3ba7ad 100644
--- a/package.json
+++ b/package.json
@@ -52,7 +52,7 @@
"babel-plugin-ramda": "^1.2.0",
"dog-names": "^1.0.2",
"dogstack": "^0.2.2",
- "dogstack-agents": "^0.1.2",
+ "dogstack-agents": "dogstack/dogstack-agents#better-agents",
"feathers-action": "^2.2.0",
"feathers-action-react": "ahdinosaur/feathers-action-react#cancel",
"feathers-errors": "^2.6.2",
diff --git a/routes.js b/routes.js
index c522ee2..7607516 100644
--- a/routes.js
+++ b/routes.js
@@ -4,10 +4,11 @@ import React from 'react'
// Top Level Containers
import Home from './app/containers/home'
+import Register from './agents/containers/Register'
+
import {
SignIn,
- SignOut,
- Register
+ SignOut
} from 'dogstack-agents/components'
import {
UserIsAuthenticated,
@@ -39,11 +40,11 @@ export default [
}
},
{
- name: 'sign-out',
- path: '/sign-out',
+ name: 'log-out',
+ path: '/log-out',
Component: UserIsAuthenticatedOrHome(SignOut),
navigation: {
- title: 'Sign out',
+ title: 'Log out',
selector: getIsAuthenticated
}
},
diff --git a/updater.js b/updater.js
index 625ba95..8da3923 100644
--- a/updater.js
+++ b/updater.js
@@ -1,13 +1,16 @@
import { concat, updateStateAt } from 'redux-fp'
import { routerReducer } from 'react-router-redux'
+import { reducer as formReducer } from 'redux-form'
import { updater as agents } from 'dogstack-agents'
const router = updateStateAt('router', reducerToUpdater(routerReducer))
+const form = updateStateAt('form', reducerToUpdater(formReducer))
export default concat(
agents,
- router
+ router,
+ form
)
function reducerToUpdater (reducer) {