Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
Fix static view
Browse files Browse the repository at this point in the history
  • Loading branch information
ukatama committed Mar 5, 2016
1 parent a6e8d99 commit f26c1cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class Chat extends Component {
href={`/view/${id}`}
target="_blank"
>
Static View
Text View
</MenuItem>
</LeftNav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const staticView = (req, res, next) => {
.findAll(room.id, user.id)
.then((messages) => ({
...room,
messages,
messages: messages.reverse(),
}))
)
.then((result) => res.render('static', {
Expand Down
6 changes: 5 additions & 1 deletion views/static.jade
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ html
each message in messages
tr
td!= message.name + '@' + message.user_id
td!= message.message.replace(/\t/g, ' ').replace(/\r?\n/g, '<br>')
td
each line in message.message
p
each node in line
span!= node.text
td!= message.modified

0 comments on commit f26c1cf

Please sign in to comment.