mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Working telegram functionality
This commit is contained in:
@@ -5,15 +5,20 @@ import { useEffect } from "react";
|
||||
|
||||
interface TestNotificationProps {
|
||||
notificationTestId: number;
|
||||
onError: (message: string) => void;
|
||||
}
|
||||
|
||||
export default function TestNotification({ notificationTestId }: TestNotificationProps) {
|
||||
export default function TestNotification({ notificationTestId, onError }: TestNotificationProps) {
|
||||
|
||||
const { getNotificationTest, notificationTest } = useNotifications();
|
||||
|
||||
|
||||
const checkNotificationTest = async () => {
|
||||
await getNotificationTest(notificationTestId);
|
||||
try {
|
||||
await getNotificationTest(notificationTestId);
|
||||
} catch (error) {
|
||||
onError(error as string);
|
||||
}
|
||||
}
|
||||
useEffect(() => {
|
||||
checkNotificationTest();
|
||||
|
||||
Reference in New Issue
Block a user