Fakultas Ilmu Komputer UI

navigation.ts 1.62 KB
Newer Older
1
import * as ROUTES from 'constants/routes';
2
3
import {
  AllAccessQuestionnaire,
4
  Checkout,
5
6
7
8
  ChoosePlan,
  ComingSoonPage,
  DietelaQuizResult,
  InitialPage,
9
  ManualRegistrationPage,
10
  LoginPage,
11
  ProgramDetail,
12
  NutritionistDetail,
Wulan Mantiri's avatar
Wulan Mantiri committed
13
  PaymentResult,
14
} from 'scenes';
15
import { FC } from 'react';
16

17
18
19
20
21
22
export interface NavRoute {
  name: string;
  component: FC;
  header?: string;
}

Wulan Mantiri's avatar
Wulan Mantiri committed
23
const navigation: NavRoute[] = [
24
25
26
27
28
  {
    name: ROUTES.allAccessQuestionnaire,
    component: AllAccessQuestionnaire,
    header: 'Dietela Quiz',
  },
29
30
31
32
33
  {
    name: ROUTES.dietelaQuizResult,
    component: DietelaQuizResult,
    header: 'Dietela Quiz Result',
  },
34
35
36
37
38
39
40
  {
    name: ROUTES.choosePlan,
    component: ChoosePlan,
    header: 'Choose Plan',
  },
  {
    name: ROUTES.programDetail,
41
    component: ProgramDetail,
42
43
44
45
    header: 'Program Dietela',
  },
  {
    name: ROUTES.nutritionistDetail,
46
    component: NutritionistDetail,
47
48
    header: 'Nutrisionis',
  },
Wulan Mantiri's avatar
Wulan Mantiri committed
49
50
51
52
53
54
55
56
];

export const publicNavigation: NavRoute[] = [
  {
    name: ROUTES.initial,
    component: InitialPage,
  },
  ...navigation,
57
58
59
60
61
  {
    name: ROUTES.registration,
    component: ManualRegistrationPage,
    header: 'Registrasi',
  },
62
63
64
65
66
  {
    name: ROUTES.login,
    component: LoginPage,
    header: 'Login',
  },
Wulan Mantiri's avatar
Wulan Mantiri committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
];

export const unpaidClientNavigation: NavRoute[] = [
  {
    name: ROUTES.checkout,
    component: Checkout,
    header: 'Checkout',
  },
  {
    name: ROUTES.paymentResult,
    component: PaymentResult,
    header: 'Pembayaran',
  },
  ...navigation,
];

export const privateNavigation: NavRoute[] = [
84
85
86
87
88
  {
    name: ROUTES.profile,
    component: ComingSoonPage,
    header: 'Profile',
  },
89
];