Desc:
- Perubahan minor
No issue
This commit is contained in:
2023-10-04 17:56:41 +08:00
parent 90692d7eff
commit a556fe63fc
8 changed files with 18 additions and 6 deletions

View File

@@ -20,6 +20,7 @@
"@types/node": "20.4.5", "@types/node": "20.4.5",
"@types/react": "18.2.17", "@types/react": "18.2.17",
"@types/react-dom": "18.2.7", "@types/react-dom": "18.2.7",
"@types/uuid": "^9.0.4",
"autoprefixer": "10.4.14", "autoprefixer": "10.4.14",
"eslint": "8.45.0", "eslint": "8.45.0",
"eslint-config-next": "13.4.12", "eslint-config-next": "13.4.12",
@@ -33,6 +34,7 @@
"react-simple-toasts": "^5.10.0", "react-simple-toasts": "^5.10.0",
"tailwindcss": "3.3.3", "tailwindcss": "3.3.3",
"typescript": "5.1.6", "typescript": "5.1.6",
"uuid": "^9.0.1",
"yaml": "^2.3.2" "yaml": "^2.3.2"
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@@ -10,4 +10,5 @@ export const ApiHipmi = {
//Profile //Profile
create_profile: "/api/profile/create", create_profile: "/api/profile/create",
edit_profile: "/api/profile/edit", edit_profile: "/api/profile/edit",
get_foto: "/api/profile/foto/",
}; };

View File

@@ -34,6 +34,8 @@ import { getProfile } from "../katalog/profile";
import { useRouter } from "next/navigation"; import { useRouter } from "next/navigation";
import { useAtom } from "jotai"; import { useAtom } from "jotai";
import { gs_token } from "./state/global_state"; import { gs_token } from "./state/global_state";
import { g_getProfile } from "../katalog/profile/fun/fun_get_profile";
import { gs_profile } from "../katalog/profile/state/global_state";
const listHalaman = [ const listHalaman = [
{ {
@@ -81,7 +83,7 @@ const listHalaman = [
export default function HomeView() { export default function HomeView() {
const router = useRouter(); const router = useRouter();
const [token, setToken] = useAtom(gs_token); const [token, setToken] = useAtom(gs_token);
const [profile, setProfile] = useState<any | null>(null);
useShallowEffect(() => { useShallowEffect(() => {
getUserId(); getUserId();
@@ -91,13 +93,10 @@ export default function HomeView() {
setToken(data); setToken(data);
} }
const [profile, setProfile] = useAtom(gs_profile);
useShallowEffect(() => { useShallowEffect(() => {
getUserProfile(); g_getProfile(setProfile);
}, []); }, []);
async function getUserProfile() {
const data = await getProfile();
setProfile(data);
}
return ( return (
<> <>

View File

@@ -756,6 +756,11 @@
"@types/mime" "*" "@types/mime" "*"
"@types/node" "*" "@types/node" "*"
"@types/uuid@^9.0.4":
version "9.0.4"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.4.tgz#e884a59338da907bda8d2ed03e01c5c49d036f1c"
integrity sha512-zAuJWQflfx6dYJM62vna+Sn5aeSWhh3OB+wfUEACNcqUSc0AGc5JKl+ycL1vrH7frGTXhJchYjE1Hak8L819dA==
"@typescript-eslint/parser@^5.42.0": "@typescript-eslint/parser@^5.42.0":
version "5.62.0" version "5.62.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7"
@@ -3533,6 +3538,11 @@ util-deprecate@^1.0.2, util-deprecate@~1.0.1:
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
uuid@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"
integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==
watchpack@2.4.0: watchpack@2.4.0:
version "2.4.0" version "2.4.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"