mirror of
https://github.com/idanoo/autobrr
synced 2025-07-24 01:09:13 +00:00
fix(web): TS typings and always active navbar link (#470)
* fix TS typings since `yarn build` was failing on my machine. * fixed the dashboard navlink (it was always active on my end)
This commit is contained in:
parent
8a782a5cab
commit
553320bf1d
5 changed files with 60 additions and 35 deletions
|
@ -394,6 +394,18 @@ interface UpdateProps {
|
|||
notification: Notification;
|
||||
}
|
||||
|
||||
interface InitialValues {
|
||||
id: number;
|
||||
enabled: boolean;
|
||||
type: NotificationType;
|
||||
name: string;
|
||||
webhook?: string;
|
||||
token?: string;
|
||||
api_key?: string;
|
||||
channel?: string;
|
||||
events: NotificationEvent[];
|
||||
}
|
||||
|
||||
export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateProps) {
|
||||
const mutation = useMutation(
|
||||
(notification: Notification) => APIClient.notifications.update(notification),
|
||||
|
@ -437,7 +449,7 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
|
|||
testMutation.mutate(data as Notification);
|
||||
};
|
||||
|
||||
const initialValues = {
|
||||
const initialValues: InitialValues = {
|
||||
id: notification.id,
|
||||
enabled: notification.enabled,
|
||||
type: notification.type,
|
||||
|
@ -450,7 +462,7 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
|
|||
};
|
||||
|
||||
return (
|
||||
<SlideOver
|
||||
<SlideOver<InitialValues>
|
||||
type="UPDATE"
|
||||
title="Notification"
|
||||
isOpen={isOpen}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue