use alias from item

This commit is contained in:
Ammar Ahmed
2022-07-08 20:54:55 +05:00
parent 222b17e3b5
commit dfcff8633c
8 changed files with 31 additions and 29 deletions

View File

@@ -47,12 +47,7 @@ export const useActions = ({ close = () => {}, item }) => {
console.log(item.readonly, 'readonly');
const user = useUserStore(state => state.user);
const [notifPinned, setNotifPinned] = useState(null);
const alias =
item.type === 'tag'
? db.tags.alias(item.id)
: item.type === 'color'
? db.colors.alias(item.id)
: item.title;
const alias = item.alias || item.title;
const isPublished = item.type === 'note' && db.monographs.isPublished(item.id);