Fakultas Ilmu Komputer UI

Commit 5f8fdee2 authored by wulanmantiri's avatar wulanmantiri

[REFACTOR] Fix login bug by handling expired or nonexisting cart for user

parent 3d046098
Pipeline #82993 passed with stages
in 9 minutes and 57 seconds
......@@ -15,6 +15,12 @@ export const getNavigation = (
) => {
if (isAuthenticated) {
if (user.role === UserRole.CLIENT) {
if (!user.cart_id) {
return {
initialRoute: ROUTES.allAccessQuestionnaire,
navigation: unpaidClientNavigation,
};
}
if ([TransactionStatus.UNPAID, null].includes(user.transaction_status)) {
return {
initialRoute: ROUTES.checkout,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment