Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Files menu ignores new server address #29620

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const hoverClass = css`
const FileItem = ({ fileData, isDeletionAllowed, onClickDelete }) => {
const format = useFormatDateAndTime();

const { _id, name, url, uploadedAt, ts, type, typeGroup, style, className, user } = fileData;
const { _id, name, path, uploadedAt, ts, type, typeGroup, style, className, user } = fileData;

return (
<Box display='flex' p='x12' borderRadius='x4' style={style} className={[className, hoverClass]}>
Expand All @@ -31,9 +31,9 @@ const FileItem = ({ fileData, isDeletionAllowed, onClickDelete }) => {
display='flex'
flexGrow={1}
flexShrink={1}
href={url}
href={path}
>
{typeGroup === 'image' ? <Avatar size='x48' url={url} /> : <FileItemIcon type={type} />}
{typeGroup === 'image' ? <Avatar size='x48' url={path} /> : <FileItemIcon type={type} />}
<Box mis='x8' flexShrink={1} overflow='hidden'>
<Box withTruncatedText color='default' fontScale='p2m'>
{name}
Expand All @@ -50,7 +50,7 @@ const FileItem = ({ fileData, isDeletionAllowed, onClickDelete }) => {
<MenuItem
_id={_id}
name={name}
url={url}
url={path}
onClickDelete={isDeletionAllowed && isDeletionAllowed({ uid: user?._id, ts }) && onClickDelete}
/>
</Box>
Expand Down
Loading