import React from "react" ; import { NotificationDataFragment } from "graphql/generated/graphql" ; export const types = { INVITATION : "INVITATION" , MENTION : "MENTION" , } ; export const actionLinks = { [ types . INVITATION ] : ( payload ) => { return `/invitation/${ payload ?. token }` ; } , [ types . MENTION ] : ( payload ) => { return `/roomId/${ payload ?. roomId }/#${ payload ?. messageId }` ; } , } ; export const NotificationSwitch = { [ types . INVITATION ] : ( notification , payload ) => { return ( < span > < span className = "textcolor--primary" > { notification . sender . name } < /span>{" "} invited you to join " < span className = "textcolor--primary" > { payload ?. roomName } < /span>" < /span>); } , [ types . MENTION ] : ( notification , payload ) => { return ( < span > < span className = "textcolor--primary" > { notification . sender . name } < /span>{" "} mentioned you in a comment at " < span className = "textcolor--primary" > { payload ?. roomName } < /span>" < br / > < span className = "textcolor--gray" > { payload ?. message } < /span> < /span>); } , } ;