- Remove existing integration tests for hooks as they're redundant after this change. - Document the pattern in relevant documentation. - Introduce `useEnvironment` to increase testability. - Update components to inject dependencies rather than importing hooks directly.
12 lines
248 B
TypeScript
12 lines
248 B
TypeScript
import { IApplication } from '@/domain/IApplication';
|
|
|
|
export function useApplication(application: IApplication) {
|
|
if (!application) {
|
|
throw new Error('missing application');
|
|
}
|
|
return {
|
|
application,
|
|
info: application.info,
|
|
};
|
|
}
|