Fix logged out mutelist
This commit is contained in:
parent
325e4be2ef
commit
d449c4aa57
@ -10,5 +10,11 @@ module.exports = {
|
||||
commonjs: true,
|
||||
node: false,
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"require-await": "error",
|
||||
"eqeqeq": "error",
|
||||
"object-shorthand": "warn",
|
||||
}
|
||||
};
|
||||
|
@ -52,7 +52,7 @@
|
||||
"scripts": {
|
||||
"start": "webpack serve",
|
||||
"build": "webpack --node-env=production",
|
||||
"deploy": "yarn build && npx wrangler pages publish build",
|
||||
"deploy": "__XXX='false' && yarn build && npx wrangler pages publish build",
|
||||
"deploy:xxzap": "__XXX='true' && yarn build && npx wrangler pages publish --project-name xxzap build"
|
||||
},
|
||||
"eslintConfig": {
|
||||
|
@ -6,7 +6,7 @@ import { MUTED } from "const";
|
||||
|
||||
export function useMute(pubkey: string) {
|
||||
const login = useLogin();
|
||||
const { tags, content } = login!.muted;
|
||||
const { tags, content } = login?.muted ?? { tags: [] };
|
||||
const muted = useMemo(() => tags.filter((t) => t.at(0) === "p"), [tags]);
|
||||
const isMuted = useMemo(
|
||||
() => muted.find((t) => t.at(1) === pubkey),
|
||||
|
Loading…
x
Reference in New Issue
Block a user