MCPcopy Index your code
hub / github.com/emwalker/digraph / createRouteConfig

Function createRouteConfig

client/src/router.tsx:42–125  ·  view source on GitHub ↗
(store: RouteStore)

Source from the content-addressed store, hash-verified

40}
41
42export const createRouteConfig = (store: RouteStore) => {
43 const { viewer } = store.getState()
44 const prepareVariables = prepareVariablesFn(viewer)
45
46 return makeRouteConfig(
47 <Route
48 Component={Layout}
49 path="/"
50 query={layoutQuery}
51 prepareVariables={(params: FoundRelayVariables, { location, router }: RouteMatch) => {
52 const { q } = location.query
53
54 return {
55 ...prepareVariables(params),
56 repoIds: [],
57 location,
58 router,
59 searchString: q,
60 }
61 }}
62 >
63 <Route
64 Component={Homepage}
65 query={homepageQuery}
66 path="/"
67 prepareVariables={prepareVariables}
68 />
69 <Route
70 render={({ props }) => <SignInPage {...props} />}
71 path="/login"
72 />
73 <Route
74 path="/recent"
75 prepareVariables={prepareVariables}
76 query={recentPageQuery}
77 render={withErrorBoundary(RecentPage)}
78 />
79 <Route
80 path="/settings"
81 >
82 <Route
83 render={() => {
84 // eslint-disable-next-line @typescript-eslint/no-throw-literal
85 throw new RedirectException('/settings/account')
86 }}
87 />
88 <Route
89 path="/account"
90 prepareVariables={prepareVariables}
91 query={userSettingsQuery}
92 render={withErrorBoundary(UserSettings)}
93 />
94 <Route
95 path="/support"
96 prepareVariables={prepareVariables}
97 query={userSettingsQuery}
98 render={withErrorBoundary(UserSettings)}
99 />

Callers 2

initFunction · 0.90
index.tsxFile · 0.90

Calls 2

prepareVariablesFnFunction · 0.85
withErrorBoundaryFunction · 0.85

Tested by

no test coverage detected