routes.js 884 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
// Data - Consumer
const DATA_USER = "/user";
const DATA_OUTSIDE = "/outside";

// # Local Code Data
const LOCCODE = "/loccode";
14
const DOE = "/doe";
15
const SIGUNGU = "/si-gun-gu";
16
17
18
const EUPMYEONDONG = "/eup-myeon-dong";

// # Auth
19
const SIGNUP = "/signup";
20
21
22
23
24
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
  dataUser: DATA_USER,
  dataOutside: DATA_OUTSIDE,
  locCode: LOCCODE,
33
  doe: DOE,
34
35
  sigungu: SIGUNGU,
  eupmyeondong: EUPMYEONDONG,
36
  signup: SIGNUP,
37
38
39
40
41
42
43
44
45
  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;