-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
25 lines (20 loc) · 749 Bytes
/
App.tsx
File metadata and controls
25 lines (20 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from 'react';
import { LiveAnnouncer, LiveMessage } from 'react-aria-live';
import { useAppSelector } from './state/hooks';
import { regionErrorSelector, stepSelector } from './state/region/regionSlice';
import Page from './components/common/Page/Page';
import ErrorMessage from './components/common/ErrorMessage/ErrorMessage';
const App = () => {
const regionError = useAppSelector(regionErrorSelector);
const currentStep = useAppSelector(stepSelector);
return (
<div className='app'>
<LiveAnnouncer>
<LiveMessage message={currentStep} aria-live='polite' />
{regionError && <ErrorMessage text={regionError.message} />}
<Page />
</LiveAnnouncer>
</div>
);
};
export default App;