mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: get user by username api (#2034)
This commit is contained in:
@ -17,15 +17,11 @@ interface Props {
|
||||
const ResourceItemDropdown = ({ resource }: Props) => {
|
||||
const t = useTranslate();
|
||||
const resourceStore = useResourceStore();
|
||||
const resources = resourceStore.state.resources;
|
||||
|
||||
const handlePreviewBtnClick = (resource: Resource) => {
|
||||
const resourceUrl = getResourceUrl(resource);
|
||||
if (resource.type.startsWith("image")) {
|
||||
showPreviewImageDialog(
|
||||
resources.filter((r) => r.type.startsWith("image")).map((r) => getResourceUrl(r)),
|
||||
resources.findIndex((r) => r.id === resource.id)
|
||||
);
|
||||
showPreviewImageDialog([getResourceUrl(resource)], 0);
|
||||
} else {
|
||||
window.open(resourceUrl);
|
||||
}
|
||||
|
Reference in New Issue
Block a user