kinda works, but wasteful and misinforming :(

This commit is contained in:
2023-12-23 21:37:11 +01:00
parent 0b15dd50ab
commit 7264b269c0
8 changed files with 93 additions and 26 deletions
@@ -2,7 +2,7 @@ import {KarakterInputs} from "../domain-models/karakter";
import axios from "axios";
export async function StoreNewCharacter(karakter: KarakterInputs) {
let response = await axios.post(`${window.location.origin}/Character/`, karakter, {
let response = await axios.post(`${window.location.origin}/api/Character/`, karakter, {
withCredentials: true,
})
if (response.status < 300){
@@ -25,8 +25,8 @@ function CharacterList(props: {faro?: Faro}) {
</thead>
<tbody>
{characters.map(c => (
<tr>
<CharacterListItem character={c} key={c.id}/>
<tr key={c.id}>
<CharacterListItem character={c}/>
</tr>
))}
</tbody>
@@ -1,16 +0,0 @@
import * as React from "react";
function ErrorBoundary(props: {}) {
return <div>
<div className="container-fluid p-5 bg-danger text-white text-center">
<h1>Valami hiba történt :(</h1>
</div>
<div className="p-5 text-center">
<p>Töltsd újra az oldalt, és ha az sem segít lépj kapcsolatba a fejlesztővel a <a href="mailto:developer@kemkas.hu">developer@kemkas.hu</a> email címen!</p>
<p>Kérlek vedd figyelembe, hogy ez egy hobby projekt limitált erőforrásokkal.</p>
</div>
</div>
}
export default ErrorBoundary;