Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Link fallback thread links
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Stoiber committed May 2, 2019
1 parent a05f199 commit d0ec639
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/message/threadAttachment/attachment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React from 'react';
import { Link } from 'react-router-dom';
import type { Props } from './';
import compose from 'recompose/compose';
import { Loading } from 'src/components/loading';
Expand All @@ -24,7 +25,10 @@ class Attachment extends React.Component<Props> {
</div>
);

if (error || !thread) return `https://spectrum.chat/thread/${id}`;
if (error || !thread)
return (
<Link to={`/thread/${id}`}>https://spectrum.chat/thread/{id}</Link>
);

return (
<div className="attachment-container">
Expand Down

0 comments on commit d0ec639

Please sign in to comment.