aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-20 14:40:18 -0400
committerIvan Chen <ivan@tagg.id>2021-04-20 14:40:18 -0400
commit419681ad0d832808caec5252fb65aa154b0e4ae2 (patch)
treeec54f924bdf3b1f16123a215cb04f35b4ce62247
parent098969cbd94fd74fe00ed974d9c019ad434a2f8a (diff)
created SYSTEM_MSG
-rw-r--r--src/components/notifications/Notification.tsx6
-rw-r--r--src/types/types.ts2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/components/notifications/Notification.tsx b/src/components/notifications/Notification.tsx
index d66ca45e..3cc1c7f1 100644
--- a/src/components/notifications/Notification.tsx
+++ b/src/components/notifications/Notification.tsx
@@ -57,8 +57,6 @@ const Notification: React.FC<NotificationProps> = (props) => {
const [avatar, setAvatar] = useState<string | undefined>(undefined);
const [momentURI, setMomentURI] = useState<string | undefined>(undefined);
- const isSystemNotification =
- username === 'Tagg' && notification_type === 'PROF_VIST';
useEffect(() => {
(async () => {
@@ -210,7 +208,7 @@ const Notification: React.FC<NotificationProps> = (props) => {
const isOwnProfile = id === loggedInUser.userId;
const navigateToProfile = async () => {
- if (isSystemNotification) {
+ if (notification_type === 'SYSTEM_MSG') {
return;
}
if (!userXInStore(state, screenType, id)) {
@@ -236,7 +234,7 @@ const Notification: React.FC<NotificationProps> = (props) => {
}
/>
</TouchableWithoutFeedback>
- {isSystemNotification ? (
+ {notification_type === 'SYSTEM_MSG' ? (
// Only verbage
<View style={styles.contentContainer}>
<Text style={styles.actorName}>{verbage}</Text>
diff --git a/src/types/types.ts b/src/types/types.ts
index b8746eea..8d7f4aed 100644
--- a/src/types/types.ts
+++ b/src/types/types.ts
@@ -253,7 +253,7 @@ export type TypeOfNotification =
// notification_object is undefined
| 'INVT_ONBRD'
// notification_object is undefined
- | 'PROF_VIST';
+ | 'SYSTEM_MSG';
export type UniversityBadge = {
id: number;