mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
#35 finally using swiperjs as image slider
This commit is contained in:
parent
d3473eab4c
commit
68249a4c62
11 changed files with 202 additions and 29 deletions
9
src/utils/hooks/node/useNodeAudios.ts
Normal file
9
src/utils/hooks/node/useNodeAudios.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { INode } from '~/redux/types';
|
||||
import { useMemo } from 'react';
|
||||
import { UPLOAD_TYPES } from '~/redux/uploads/constants';
|
||||
|
||||
export const useNodeAudios = (node: INode) => {
|
||||
return useMemo(() => node.files.filter(file => file && file.type === UPLOAD_TYPES.AUDIO), [
|
||||
node.files,
|
||||
]);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue