Skip to content

Commit

Permalink
EPICSYSTEM-45: Added handling to load homepage to default tenant (#46)
Browse files Browse the repository at this point in the history
* EPICSYSTEM-45: Added handling to load homepage to default tenant

* Fixed linting issue
  • Loading branch information
Ckoelewyn authored Jun 17, 2024
1 parent aafd0d9 commit f056041
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion met-web/src/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
import type { RootState, AppDispatch } from './store';
import { useTranslation } from 'react-i18next';
import { AppConfig } from 'config';

// Use throughout your app instead of plain `useDispatch` and `useSelector`
export const useAppDispatch = () => useDispatch<AppDispatch>();
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;

export const useAppTranslation = () => {
const translate = useTranslation();
const tenantId = sessionStorage.getItem('tenantId');
const tenantId = sessionStorage.getItem('tenantId') || AppConfig.tenant.defaultTenant;

const { t } = translate;

Expand Down

0 comments on commit f056041

Please sign in to comment.