NotificationStore
This commit is contained in:
@ -7,7 +7,8 @@ import CreateQr from '../services/CreateQr';
|
||||
import Img from './Img';
|
||||
import './InputForm.css';
|
||||
import { TextInput } from '@mantine/core';
|
||||
import { notificationError, notificationSuccess } from '../services/Notifications';
|
||||
import { notificationAlert, notificationError, notificationSuccess } from '../services/Notifications';
|
||||
//import { eNotif, useNotificationStore } from "../services/NotificationStore";
|
||||
|
||||
type TFormData =
|
||||
{
|
||||
@ -34,6 +35,7 @@ function Profil()
|
||||
// data ist dogdata, logindata holt sich getProfilData.php aus $_SESSION
|
||||
|
||||
const WWW_ROOT: string = process.env.REACT_APP_WWW_ROOT!;
|
||||
// const { DeleteNotification, queue } = useNotificationStore();
|
||||
|
||||
|
||||
if (error) return (<div>failed to load</div>);
|
||||
@ -51,6 +53,26 @@ function Profil()
|
||||
console.log('Profil user');
|
||||
console.log(user);
|
||||
|
||||
// if(queue.length > 0)
|
||||
// {
|
||||
// console.log('queue');
|
||||
// console.log(queue);
|
||||
// const not = queue[queue.length-1];
|
||||
|
||||
// switch (not.type) {
|
||||
// case eNotif.success:
|
||||
// notificationSuccess(not.msg);
|
||||
// break;
|
||||
// case eNotif.error:
|
||||
// notificationError(not.msg);
|
||||
// break;
|
||||
// case eNotif.alert:
|
||||
// default:
|
||||
// notificationAlert(not.msg);
|
||||
// }
|
||||
// DeleteNotification();
|
||||
// }
|
||||
|
||||
if(data.data.qr_code === null && document.getElementById("canvas") != null)
|
||||
{
|
||||
// qrcode generieren und in der Datenbank speichern
|
||||
|
||||
Reference in New Issue
Block a user