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);
|
||||
|
||||
@@ -9,7 +9,7 @@ import { registerRoute } from 'workbox-routing';
|
||||
import { CacheFirst, NetworkFirst, StaleWhileRevalidate } from 'workbox-strategies';
|
||||
|
||||
declare const self: ServiceWorkerGlobalScope & {
|
||||
__WB_MANIFEST: Array<import('workbox-precaching').ManifestEntry>;
|
||||
__WB_MANIFEST: Array<any>;
|
||||
};
|
||||
|
||||
clientsClaim();
|
||||
@@ -97,7 +97,7 @@ self.addEventListener('message', (event) => {
|
||||
}
|
||||
});
|
||||
|
||||
self.addEventListener('sync', (event) => {
|
||||
self.addEventListener('sync', (event: any) => {
|
||||
if (event.tag === 'upload-queue') {
|
||||
event.waitUntil(
|
||||
(async () => {
|
||||
|
||||
@@ -11,20 +11,20 @@ describe('BadgesGrid', () => {
|
||||
<BadgesGrid
|
||||
badges={[
|
||||
{
|
||||
id: 1,
|
||||
title: 'First Badge',
|
||||
description: 'Earned badge',
|
||||
id: '1',
|
||||
title: 'First Upload',
|
||||
description: 'Uploaded your first photo',
|
||||
earned: true,
|
||||
progress: 1,
|
||||
target: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'Second Badge',
|
||||
description: 'Pending badge',
|
||||
id: '2',
|
||||
title: 'Social Star',
|
||||
description: 'Received 10 likes',
|
||||
earned: false,
|
||||
progress: 0,
|
||||
target: 5,
|
||||
progress: 3,
|
||||
target: 10,
|
||||
},
|
||||
]}
|
||||
t={t}
|
||||
|
||||
Reference in New Issue
Block a user