routes.js 886 Bytes
Newer Older
1
// # Global Routes
KangMin An's avatar
KangMin An committed
2
3
const HOME = "/";

4
// # Data Routes
5
const DATA = "/data";
6
// Data - Collector
7
const DATA_INPUT = "/input";
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Data - Consumer
const DATA_USER = "/user";
const DATA_OUTSIDE = "/outside";

// # Local Code Data
const LOCCODE = "/loccode";
const DO = "/do";
const SIGUNGU = "/sigungu";
const EUPMYEONDONG = "/eup-myeon-dong";

// # Auth
const REGISTER = "/register";
const LOGIN = "/login";
const EDIT_PROFILE = "/edit-profile";

// # Detail Object
const DETAIL = "/:id";
25

KangMin An's avatar
KangMin An committed
26
27
const routes = {
  home: HOME,
28
29
  data: DATA,
  dataInput: DATA_INPUT,
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  dataUser: DATA_USER,
  dataOutside: DATA_OUTSIDE,
  locCode: LOCCODE,
  do: DO,
  sigungu: SIGUNGU,
  eupmyeondong: EUPMYEONDONG,
  register: REGISTER,
  login: LOGIN,
  editProfile: EDIT_PROFILE,
  Detail: (id) => {
    if (id) {
      return `/${id}`;
    } else {
      return DETAIL;
    }
  },
KangMin An's avatar
KangMin An committed
46
47
48
};

export default routes;