fix:fixing base on prod
This commit is contained in:
parent
0a16dbe20a
commit
ace3decdaa
|
|
@ -11,12 +11,14 @@ export default function Settings() {
|
|||
const [profile, setProfile] = useState<any>();
|
||||
const uid = Cookies.get("uie");
|
||||
useEffect(() => {
|
||||
initFetch();
|
||||
}, []);
|
||||
if (!profile) {
|
||||
initFetch();
|
||||
}
|
||||
}, [profile]);
|
||||
const initFetch = async () => {
|
||||
loading();
|
||||
const profile = await getDetailMasterUsers(String(uid));
|
||||
// const profile = await getProfile();
|
||||
// const profile = await getDetailMasterUsers(String(uid));
|
||||
const profile = await getProfile();
|
||||
setProfile(profile?.data?.data);
|
||||
close();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -254,15 +254,15 @@ export default function Login() {
|
|||
Cookies.set("username", profile?.username, {
|
||||
expires: 1,
|
||||
});
|
||||
Cookies.set("urie", profile?.roleId, {
|
||||
expires: 1,
|
||||
});
|
||||
Cookies.set("roleName", profile?.roleName, {
|
||||
expires: 1,
|
||||
});
|
||||
Cookies.set("masterPoldaId", profile?.masterPoldaId, {
|
||||
Cookies.set("urie", profile?.userRoleId, {
|
||||
expires: 1,
|
||||
});
|
||||
// Cookies.set("roleName", profile?.roleName, {
|
||||
// expires: 1,
|
||||
// });
|
||||
// Cookies.set("masterPoldaId", profile?.masterPoldaId, {
|
||||
// expires: 1,
|
||||
// });
|
||||
Cookies.set("ulne", profile?.userLevelId, {
|
||||
expires: 1,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -286,8 +286,8 @@ export default function HeaderNews() {
|
|||
<div className="relative w-full h-[50vh] lg:h-[500px]">
|
||||
<Image
|
||||
alt="headernews"
|
||||
width={480}
|
||||
height={480}
|
||||
width={1080}
|
||||
height={1080}
|
||||
onLoad={(e) => handleImageLoad(e, index)}
|
||||
src={
|
||||
newsItem?.thumbnailUrl === ""
|
||||
|
|
@ -297,7 +297,7 @@ export default function HeaderNews() {
|
|||
className={`!object-cover !rounded-none ${
|
||||
portraitMap[index]
|
||||
? "!w-auto object-cover mx-auto"
|
||||
: "!w-[90vw]"
|
||||
: "!w-full"
|
||||
} !h-[500px]`}
|
||||
/>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue