fix:fixing base on prod

This commit is contained in:
Rama Priyanto 2025-06-12 22:02:57 +07:00
parent 0a16dbe20a
commit ace3decdaa
3 changed files with 16 additions and 14 deletions

View File

@ -11,12 +11,14 @@ export default function Settings() {
const [profile, setProfile] = useState<any>(); const [profile, setProfile] = useState<any>();
const uid = Cookies.get("uie"); const uid = Cookies.get("uie");
useEffect(() => { useEffect(() => {
initFetch(); if (!profile) {
}, []); initFetch();
}
}, [profile]);
const initFetch = async () => { const initFetch = async () => {
loading(); loading();
const profile = await getDetailMasterUsers(String(uid)); // const profile = await getDetailMasterUsers(String(uid));
// const profile = await getProfile(); const profile = await getProfile();
setProfile(profile?.data?.data); setProfile(profile?.data?.data);
close(); close();
}; };

View File

@ -254,15 +254,15 @@ export default function Login() {
Cookies.set("username", profile?.username, { Cookies.set("username", profile?.username, {
expires: 1, expires: 1,
}); });
Cookies.set("urie", profile?.roleId, { Cookies.set("urie", profile?.userRoleId, {
expires: 1,
});
Cookies.set("roleName", profile?.roleName, {
expires: 1,
});
Cookies.set("masterPoldaId", profile?.masterPoldaId, {
expires: 1, expires: 1,
}); });
// Cookies.set("roleName", profile?.roleName, {
// expires: 1,
// });
// Cookies.set("masterPoldaId", profile?.masterPoldaId, {
// expires: 1,
// });
Cookies.set("ulne", profile?.userLevelId, { Cookies.set("ulne", profile?.userLevelId, {
expires: 1, expires: 1,
}); });

View File

@ -286,8 +286,8 @@ export default function HeaderNews() {
<div className="relative w-full h-[50vh] lg:h-[500px]"> <div className="relative w-full h-[50vh] lg:h-[500px]">
<Image <Image
alt="headernews" alt="headernews"
width={480} width={1080}
height={480} height={1080}
onLoad={(e) => handleImageLoad(e, index)} onLoad={(e) => handleImageLoad(e, index)}
src={ src={
newsItem?.thumbnailUrl === "" newsItem?.thumbnailUrl === ""
@ -297,7 +297,7 @@ export default function HeaderNews() {
className={`!object-cover !rounded-none ${ className={`!object-cover !rounded-none ${
portraitMap[index] portraitMap[index]
? "!w-auto object-cover mx-auto" ? "!w-auto object-cover mx-auto"
: "!w-[90vw]" : "!w-full"
} !h-[500px]`} } !h-[500px]`}
/> />