-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(#35): add attachments to video form #36
base: main
Are you sure you want to change the base?
Conversation
f6e5c9b
to
0251b49
Compare
What is the status of this PR ? |
cea8cc9
to
159bca4
Compare
@jlabatut Hey, i was reviewing you're PR, and it doesn't work in mocked environment, any reasons ? |
425d6fa
to
8f726b4
Compare
<CopyToClipboard | ||
onCopy={() => { | ||
snackbarService.createSnackbar( | ||
tUsers('profile.tabs.attachments.content.list.clipboard'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tUsers('profile.tabs.attachments.content.list.clipboard'), | |
t('profile.tabs.attachments.content.list.clipboard', { ns: 'user' }), |
const { t: tUsers } = useTranslation('users') | ||
const { t: tAttachments } = useTranslation('attachments') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use only one useTranslation('user') or useTranslation('attachements') then if you want to change use namespace
t('profile.tabs.attachments.content.list.clipboard', { ns: 'user' })
}} | ||
text={url} | ||
> | ||
<Tooltip title={tAttachments<string>('actions.copyToClipboard')}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Tooltip title={tAttachments<string>('actions.copyToClipboard')}> | |
<Tooltip title={t<string>('actions.copyToClipboard')}> |
useEffect(() => { | ||
/* Since the attachments are not invalidated after a video update, we need to refetch them here */ | ||
if (data) refetch() | ||
}, []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, []) | |
}, [data]) |
} | ||
} | ||
} | ||
}, [videoId, data]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe
}, [videoId, data]) | |
}, [videoId, data, fields]) |
} | ||
disablePadding | ||
> | ||
<ListItemButton onClick={handleToggle(item)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, but i'm not sure
{!isLoading && | ||
(data && | ||
data.items.length > 0 && | ||
data.items.length < data.totalCount ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can group everything into one function for clarity
/> | ||
</Box> | ||
) : ( | ||
!data || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can group everything into one function for clarity
@@ -40,7 +40,7 @@ export const attachmentsApi = createApi({ | |||
}), | |||
getVideoAttachments: builder.query<PaginatedAttachments, string>({ | |||
query: (videoId: string) => { | |||
return `${Endpoint.Attachments}/video/${videoId}` | |||
return `${Endpoint.Attachments}/video/${videoId}?pageSize=50&page=1` // TODO : remove pagination from attachment service (only for /video/id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo ?
useEffect(() => { | ||
/* Since the attachments are not invalidated after a video update, we need to refetch them here */ | ||
if (attachments) refetch() | ||
}, []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, []) | |
}, [attachments]) |
2dd0535
to
f285c93
Compare
closes #35
How to test :