Skip to content

Commit 7fbbfb5

Browse files
committed
refactor: Restructure dual audio context and controller for improved functionality
- Refactored the dual audio context by creating a new `useDualAudioController.hook.ts` file, consolidating logic and enhancing maintainability. - Introduced an `index.ts` file to streamline imports for dual audio components. - Added utility functions for audio volume fading and error handling to improve user experience. - Removed deprecated code from `useDualAudioController.ts` to simplify the codebase and reduce complexity. - Ensured proper context type handling with refs for audio elements, enhancing the overall audio management system.
1 parent c582c33 commit 7fbbfb5

File tree

6 files changed

+458
-595
lines changed

6 files changed

+458
-595
lines changed

src/shared-components/organisms/Footer/components/dual-audio/DualAudioContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createContext, useContext, ReactNode } from 'react';
2-
import { useDualAudioController, DualAudioContextTypeWithRefs } from './useDualAudioController';
2+
import { useDualAudioController, DualAudioContextTypeWithRefs } from './index';
33

44
const DualAudioContext = createContext<DualAudioContextTypeWithRefs | undefined>(undefined);
55

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './useDualAudioController.hook';
2+
export * from './DualAudio.types';

0 commit comments

Comments
 (0)