mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-28 01:48:11 +03:00
fix: don't make site announcements clickable
maybe we could do a blog in the future idk or care
This commit is contained in:
@@ -5,6 +5,8 @@ import { Link } from "react-router-dom";
|
||||
import { NotificationDocument } from "tachi-common";
|
||||
|
||||
export default function NotificationRow({ notif }: { notif: NotificationDocument }) {
|
||||
const url = NotifToURL(notif);
|
||||
|
||||
return (
|
||||
<tr>
|
||||
<td>
|
||||
@@ -16,9 +18,13 @@ export default function NotificationRow({ notif }: { notif: NotificationDocument
|
||||
</td>
|
||||
<td>
|
||||
<strong>
|
||||
<Link className="gentle-link" to={NotifToURL(notif)}>
|
||||
{notif.title}
|
||||
</Link>
|
||||
{url ? (
|
||||
<Link className="gentle-link" to={url}>
|
||||
{notif.title}
|
||||
</Link>
|
||||
) : (
|
||||
notif.title
|
||||
)}
|
||||
</strong>
|
||||
</td>
|
||||
<TimestampCell time={notif.sentAt} />
|
||||
@@ -36,6 +42,6 @@ function NotifToURL(notif: NotificationDocument) {
|
||||
case "RIVALED_BY":
|
||||
return `/u/${notif.body.content.userID}/games/${notif.body.content.game}/${notif.body.content.playtype}`;
|
||||
case "SITE_ANNOUNCEMENT":
|
||||
return `#`;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user