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