aboutsummaryrefslogtreecommitdiff
path: root/src/utils/users.ts
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-26 17:28:23 -0400
committerIvan Chen <ivan@tagg.id>2021-03-26 17:28:23 -0400
commit64f8829ab55bfe6851f10ca933043877769c56bf (patch)
tree1e28d37d626b85bf5f131f5a1f9e8b787f3cf069 /src/utils/users.ts
parent82acd049763452decdab0c40e6cf7286dd2ed57d (diff)
show taggsbar, prevent taggsbar navigation on profile and SP
Diffstat (limited to 'src/utils/users.ts')
-rw-r--r--src/utils/users.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils/users.ts b/src/utils/users.ts
index d5e44b36..6cb6d46c 100644
--- a/src/utils/users.ts
+++ b/src/utils/users.ts
@@ -174,3 +174,11 @@ export const defaultUserProfile = () => {
const defaultImage = require('../assets/images/avatar-placeholder.png');
return defaultImage;
};
+
+export const canViewProfile = (
+ ownProfile: boolean,
+ isPrivate: boolean,
+ isFriend: boolean,
+) => {
+ return ownProfile || isFriend || !isPrivate;
+};