Header, Footer, FileUpload

This commit is contained in:
Peter Hoppe
2022-12-28 15:08:29 +01:00
parent fd65306aaf
commit 4da1c85fe9
18 changed files with 256 additions and 26 deletions

View File

@ -1,10 +1,9 @@
import { ResponseT, UserCtx, UserCtxT } from '../context/UserContext';
import React, { useContext, useState, ReactNode } from 'react'
import { UserCtx, UserCtxT } from '../context/UserContext';
import { useContext, ReactNode } from 'react'
import { useParams } from "react-router-dom";
import Img from './Img';
import DogNameTxt from './DogNameTxt';
import './Dog.css';
import { JSXElement, JSXFragment } from '@babel/types';
const Dog = () =>
{
@ -13,21 +12,20 @@ const Dog = () =>
// m7MdMK
const params = useParams();
const qr_id = Object.values(params)[0];
var data;
var needData = dog.success === undefined;
if(needData)
{
data = getDog(qr_id); // await not allowed?! => workaraound
getDog(qr_id); // await not allowed?! => workaraound
}
var email = "nicht definiert;"
var phone = "nicht definiert;"
var picPath = "nicht definiert;"
var qrPath = "nicht definiert;"
//var qrPath = "nicht definiert;"
var name = "nicht definiert;"
if(dog.success === 1)
{
name = dog.data.name;
qrPath = dog.data.qr_code;
//qrPath = dog.data.qr_code;
picPath = dog.data.picture;
email = dog.data.email;
phone = dog.data.phone;