diff --git a/src/components/App.js b/src/components/App.js
index 5104225..eb14377 100644
--- a/src/components/App.js
+++ b/src/components/App.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Switch, Route, withRouter } from 'react-router-dom'
import Boards from '../containers/Boards'
-import BoardEditor from '../containers/BoardEditor'
+import OpenBoard from '../containers/OpenBoard'
import WithBoard from '../containers/WithBoard'
import BoardPage from '../components/BoardPage'
import 'semantic-ui-css/semantic.css'
@@ -10,7 +10,7 @@ class App extends Component {
render() {
return (
-
+
diff --git a/src/components/BoardPage.js b/src/components/BoardPage.js
index 18518db..3977df6 100644
--- a/src/components/BoardPage.js
+++ b/src/components/BoardPage.js
@@ -1,12 +1,14 @@
import React from 'react'
import { Switch, Route } from 'react-router-dom'
import Board from '../containers/Board'
+import BoardEditor from '../containers/Board'
import PostEditor from '../containers/PostEditor'
import WithStats from '../containers/WithStats'
function BoardPage({ match, address, posts, metadata }) {
return
+
}
diff --git a/src/components/Boards.js b/src/components/Boards.js
index 33e6814..a36622d 100644
--- a/src/components/Boards.js
+++ b/src/components/Boards.js
@@ -20,7 +20,7 @@ export default function Boards({ stats, boards, createBoard }) {
-
+
Connected Peers
{stats.peers.length}
diff --git a/src/components/BoardsItem.js b/src/components/BoardsItem.js
index 1f99074..6f34f3a 100644
--- a/src/components/BoardsItem.js
+++ b/src/components/BoardsItem.js
@@ -1,22 +1,33 @@
import React from 'react'
-import { Button, Card } from 'semantic-ui-react'
+import { List, Button, Card } from 'semantic-ui-react'
import { Link } from 'react-router-dom'
import { shortenAddress } from '../utils/orbitdb'
-export default function BoardsItem({ address, title }) {
+export default function BoardsItem({ address, title, name }) {
return
{ title || 'Unnamed board' }
-
- Board
-
-
-
-
- {address}
-
+ Board
+
+
+
+
+
+
+ Name
+ {name}
+
+
+
+
+
+ Address
+ {address}
+
+
+
diff --git a/src/components/BoardForm.js b/src/components/OpenBoardForm.js
similarity index 96%
rename from src/components/BoardForm.js
rename to src/components/OpenBoardForm.js
index 8fd4778..22f53f5 100644
--- a/src/components/BoardForm.js
+++ b/src/components/OpenBoardForm.js
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import { Container, Card, Form, Button } from 'semantic-ui-react'
-export default class BoardForm extends Component {
+export default class OpenBoardForm extends Component {
constructor(props){
super(props)
this.state = {
diff --git a/src/containers/BoardEditor.js b/src/containers/OpenBoard.js
similarity index 66%
rename from src/containers/BoardEditor.js
rename to src/containers/OpenBoard.js
index 0c75ac1..393d5f6 100644
--- a/src/containers/BoardEditor.js
+++ b/src/containers/OpenBoard.js
@@ -1,15 +1,15 @@
import React from 'react'
import { connect } from 'react-redux'
-import BoardForm from '../components/BoardForm'
+import OpenBoardForm from '../components/OpenBoardForm'
import { openBoard } from '../actions/board'
-function BoardEditor(props) {
- return
+function OpenBoard(props) {
+ return
}
function mapStateToProps(state){
return {
- opening: state.boardEditor.opening
+ opening: state.openBoard.opening
}
}
@@ -22,4 +22,4 @@ function mapDispatchToProps(dispatch) {
export default connect(
mapStateToProps,
mapDispatchToProps
-)(BoardEditor)
+)(OpenBoard)
diff --git a/src/reducers/index.js b/src/reducers/index.js
index dc43c42..f15c67d 100644
--- a/src/reducers/index.js
+++ b/src/reducers/index.js
@@ -2,11 +2,11 @@ import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux'
import postReducer from './post'
import boardsReducer from './boards'
-import boardEditorReducer from './boardEditor'
+import openBoardReducer from './openboard'
export default combineReducers({
router: routerReducer,
postEditor: postReducer,
boards: boardsReducer,
- boardEditor: boardEditorReducer
+ openBoard: openBoardReducer
})
\ No newline at end of file
diff --git a/src/reducers/boardEditor.js b/src/reducers/openboard.js
similarity index 83%
rename from src/reducers/boardEditor.js
rename to src/reducers/openboard.js
index d010406..b81919d 100644
--- a/src/reducers/boardEditor.js
+++ b/src/reducers/openboard.js
@@ -9,7 +9,7 @@ function getInitialState() {
}
}
-export default function BoardEditorReducer(state = getInitialState(), action) {
+export default function openBoardReducer(state = getInitialState(), action) {
switch (action.type) {
case OPEN_BOARD:
return Object.assign({}, state, { opening: true })
diff --git a/src/sagas/boards.js b/src/sagas/boards.js
index 92ac96e..ba4bdf3 100644
--- a/src/sagas/boards.js
+++ b/src/sagas/boards.js
@@ -35,6 +35,7 @@ export function* openBoard({ board }) {
const dbInfo = { address }
dbInfo.posts = db.posts
dbInfo.metadata = db.metadata
+ dbInfo.name = db.dbname
try {
const channel = yield call(createDbEventChannel, db)
yield fork(watchDb, channel)