Skip to content

Commit

Permalink
route fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tima101 committed Sep 26, 2018
1 parent 82b4e81 commit 920bcf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/server/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function auth({ ROOT_URL, server }) {
if (!req.user.defaultTeamSlug) {
redirectUrlAfterLogin = '/create-team';
} else {
redirectUrlAfterLogin = `/team/${req.user.defaultTeamSlug}/d`;
redirectUrlAfterLogin = `/team/${req.user.defaultTeamSlug}/discussions`;
}
}

Expand Down
5 changes: 3 additions & 2 deletions app/components/discussions/DiscussionListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class DiscussionListItem extends React.Component<Props> {
const { store, discussion, team } = this.props;
const trimmingLength = 16;

const selectedDiscussion = store.currentUrl === `/team/${team.slug}/discussions/${discussion.slug}`;
const selectedDiscussion =
store.currentUrl === `/team/${team.slug}/discussions/${discussion.slug}`;

return (
<Paper
Expand All @@ -36,7 +37,7 @@ class DiscussionListItem extends React.Component<Props> {
href={`/discussion?teamSlug=${team.slug}&discussionSlug=${discussion.slug}`}
as={`/team/${team.slug}/discussions/${discussion.slug}`}
>
<a style={{ fontWeight: 300 }}>
<a style={{ fontWeight: 300 }} key={discussion._id}>
{discussion.name.length > trimmingLength
? `${discussion.name.substring(0, trimmingLength)}...`
: discussion.name}
Expand Down

0 comments on commit 920bcf2

Please sign in to comment.