mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 21:58:23 +00:00
feat(asset): link to assets on notification cards. (#451)
* feat(asset): link to assets on notification cards. * Update packages/webui/components/notification-card.tsx Co-authored-by: Yiling-J <njjyl723@gmail.com> --------- Co-authored-by: Yiling-J <njjyl723@gmail.com>
This commit is contained in:
@@ -136,13 +136,19 @@ export const NotificationCard = ({ notification }: NotificationCardProps) => {
|
||||
|
||||
const hasPreview = asset?.preview && (asset.proxyType === 'image' || asset.proxyType === 'video')
|
||||
|
||||
const handleClick = () => {
|
||||
const handleClick = () => {
|
||||
if (kanbanTask?.id && team?.id) {
|
||||
navigate({
|
||||
to: '/teams/$teamId/kanban',
|
||||
params: { teamId: team.id },
|
||||
search: { taskId: kanbanTask.id },
|
||||
})
|
||||
}else if(project?.id && asset?.id){
|
||||
//TODO: Perhaps it should be marked as read too when redirecting to it.
|
||||
navigate({
|
||||
to: '/projects/$projectId/files/$fileId',
|
||||
params: { projectId: project.id, fileId: asset.id },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user