can change name

This commit is contained in:
2025-08-16 00:15:07 -05:00
parent 1c915d1713
commit c755b83d3d
2 changed files with 6 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
import { Route, Router } from "@solidjs/router";
import { lazy, Suspense } from "solid-js";
import { createResource, lazy, Suspense } from "solid-js";
import { render } from "solid-js/web";
import "virtual:uno.css";
import pkg from "../package.json";
@@ -8,6 +8,7 @@ import api from "./api";
const Profile = () => {
let dialogRef!: HTMLDialogElement;
const [profile] = createResource(async () => api.profile.get());
return (
<>
@@ -20,6 +21,7 @@ const Profile = () => {
<div class="fixed tr bg-emerald-100 m-2 p-4 rounded-xl border-2 shadow-md shadow-black">
Name:{" "}
<input
value={profile()?.data?.name ?? ""}
onChange={(e) =>
api.setName.post({ name: e.target.value })
}