fix: resolve typescript and build errors across admin and guest apps
This commit is contained in:
@@ -509,7 +509,7 @@ function NotificationButton({ center, eventToken, open, onToggle, panelRef, butt
|
||||
t={t}
|
||||
/>
|
||||
</div>,
|
||||
typeof document !== 'undefined' ? document.body : undefined
|
||||
(typeof document !== 'undefined' ? document.body : null) as any
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function RouteTransition({ children }: { children?: React.ReactNo
|
||||
initial="enter"
|
||||
animate="center"
|
||||
exit="exit"
|
||||
transition={transition}
|
||||
transition={transition as any}
|
||||
style={{ willChange: 'transform, opacity' }}
|
||||
>
|
||||
{content}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
import { fireEvent, render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import Header from '../Header';
|
||||
|
||||
vi.mock('../settings-sheet', () => ({
|
||||
@@ -87,7 +88,11 @@ vi.mock('../../i18n/useTranslation', () => ({
|
||||
|
||||
describe('Header notifications toggle', () => {
|
||||
it('closes the panel when clicking the bell again', () => {
|
||||
render(<Header eventToken="demo" title="Demo" />);
|
||||
render(
|
||||
<MemoryRouter>
|
||||
<Header eventToken="demo" title="Demo" />
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
const bellButton = screen.getByLabelText('Benachrichtigungen anzeigen');
|
||||
fireEvent.click(bellButton);
|
||||
|
||||
Reference in New Issue
Block a user