-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic path pages #119
base: master
Are you sure you want to change the base?
Dynamic path pages #119
Changes from 4 commits
b2b0bee
0174162
6899bd1
f008d8d
d02473a
6f68ed8
d5ba003
a00c6c5
b1e9339
f76ca25
8fe5764
93d9524
83f5847
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ export interface IConfig { | |
unauthorizedRedirectUrl: string | ||
requestHeaders: any | ||
pages: IConfigPage[] | ||
resources: IConfigResourcePage[] | ||
customStyles?: ICustomStyles | ||
customLabels?: ICustomLabels | ||
} | ||
|
@@ -75,6 +76,15 @@ export interface IConfigPage { | |
customLabels: ICustomLabels | ||
} | ||
|
||
export interface IConfigDetailPage { | ||
id: string | ||
name: string | ||
description: string | ||
resources: IConfigResourcePage[] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can a |
||
} | ||
|
||
export interface IConfigResourcePage extends IConfigPage { } | ||
|
||
export interface IConfigMethods { | ||
getAll: IConfigGetAllMethod | ||
getSingle: IConfigGetSingleMethod | ||
|
@@ -149,6 +159,7 @@ export interface IConfigGetAllMethod extends IConfigMethod { | |
|
||
export interface IConfigGetSingleMethod extends IConfigMethod { | ||
dataPath: string | ||
detailPage: IConfigDetailPage | ||
} | ||
|
||
export interface IConfigPostMethod extends IConfigMethod { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,25 @@ import HttpService from '../services/http.service'; | |
export interface IAppContext { | ||
config: IConfig | null | ||
activePage: IConfigPage | null | ||
activeItem: any | null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic was that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. |
||
activePathVars: {[key: string]: string} | ||
error: string | null | ||
setError: (error: string | null) => void | ||
setActivePage: (activePage: IConfigPage | null) => void | ||
setActiveItem: (activeItem: any | null) => void | ||
setActivePathVars: (activePathVars: {[key: string]: string}) => void | ||
httpService: HttpService | ||
} | ||
|
||
export const AppContext = React.createContext<IAppContext>({ | ||
config: null, | ||
activePage: null, | ||
activeItem: null, | ||
activePathVars: {}, | ||
error: null, | ||
setError: () => {}, | ||
setActivePage: () => {}, | ||
setActiveItem: () => {}, | ||
setActivePathVars: () => {}, | ||
httpService: new HttpService() | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be
resources
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the schema is just not up to date yet.