fix ( middleware )
deskripsi: - fix access api melalui middleware di: home, profile dan portofolio
This commit is contained in:
@@ -19,7 +19,7 @@ export default function ListPortofolioProfileNew() {
|
||||
try {
|
||||
setLoading(true)
|
||||
const response = await apiGetPortofolioByProfile(`?profile=${param.id}&cat=profile`)
|
||||
if (response.success) {
|
||||
if (response) {
|
||||
setDataPortofolio(response.data);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -65,7 +65,7 @@ export default function ProfileDetail() {
|
||||
try {
|
||||
setLoading(true);
|
||||
const response = await apiGetUserProfile(`?profile=${param.id}`);
|
||||
if (response.success) {
|
||||
if (response) {
|
||||
setDataProfile(response.data);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user