diff --git a/app/talk/board-preview.cjsx b/app/talk/board-preview.cjsx index 1616a921de..e9f2b578f4 100644 --- a/app/talk/board-preview.cjsx +++ b/app/talk/board-preview.cjsx @@ -4,6 +4,7 @@ createReactClass = require 'create-react-class' {Link} = require 'react-router' resourceCount = require './lib/resource-count' LatestCommentLink = require './latest-comment-link' +baseURL = require('./lib/base-url').default module.exports = createReactClass displayName: 'TalkBoardDisplay' @@ -17,10 +18,9 @@ module.exports = createReactClass boardLink: -> {owner, name} = @props.params boardId = @props.data.id - baseURL = @props.project?._type._name - if baseURL - + if @props.project + {@props.data.title} else diff --git a/app/talk/board.cjsx b/app/talk/board.cjsx index 0f32734ba5..85a85baf8c 100644 --- a/app/talk/board.cjsx +++ b/app/talk/board.cjsx @@ -20,6 +20,7 @@ merge = require 'lodash/merge' talkConfig = require './config' SignInPrompt = require '../partials/sign-in-prompt' alert = require('../lib/alert').default +baseURL = require('./lib/base-url').default `import ActiveUsers from './active-users';` ProjectLinker = require './lib/project-linker' @@ -211,7 +212,6 @@ module.exports = createReactClass render: -> - baseURL = @props.project?._type._name {board} = @state discussionsMeta = @state.discussions[0]?.getMeta() @@ -233,7 +233,7 @@ module.exports = createReactClass
{comment.user_display_name} @@ -170,8 +169,7 @@ module.exports = createReactClass isDeleted = if @props.data.is_deleted then 'deleted' else '' profile_link = "/users/#{@props.author?.login}" if @props.project? - baseURL = @props.project._type._name - profile_link = "/#{baseURL}/#{@props.project.slug}#{profile_link}" + profile_link = "/#{baseURL(@props.project)}/#{@props.project.slug}#{profile_link}" author_login = if @props.author?.login then "@#{@props.author.login}" else ""