1 import { PostView } from "lemmy-js-client";
2 import { UserService } from "../../services";
4 export default function nsfwCheck(
6 myUserInfo = UserService.Instance.myUserInfo
8 const nsfw = pv.post.nsfw || pv.community.nsfw;
9 const myShowNsfw = myUserInfo?.local_user_view.local_user.show_nsfw ?? false;
10 return !nsfw || (nsfw && myShowNsfw);