refactor(projects): all file and folder use kebab-case
This commit is contained in:
14
src/hooks/common/use-loading-empty.ts
Normal file
14
src/hooks/common/use-loading-empty.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import useBoolean from './use-boolean';
|
||||
|
||||
export default function useLoadingEmpty(initLoading = false, initEmpty = false) {
|
||||
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initLoading);
|
||||
const { bool: empty, setBool: setEmpty } = useBoolean(initEmpty);
|
||||
|
||||
return {
|
||||
loading,
|
||||
startLoading,
|
||||
endLoading,
|
||||
empty,
|
||||
setEmpty
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user