bzp2010 commented on a change in pull request #175: feature: add docker support URL: https://github.com/apache/incubator-apisix-dashboard/pull/175#discussion_r410804239
########## File path: src/utils/utils.ts ########## @@ -76,3 +76,11 @@ export const getPageMode = (): PageMode => { return 'VIEW'; }; + +export const getAdminAPI = (): string => { Review comment: > like `@/utils/config`. But, `/config` is compile time configuration, `/src/xxxx` is runtime. > > In fact, I use DefinePlugin by webpack, [description link](https://webpack.js.org/plugins/define-plugin/). > First, declare it in the configuration file, `{ADMIN_API: 'xxxxx'}`, it will automatically replace the part of the program that uses the `ADMIN_API` at compile time without import, Such as > `let adminAPI = ADMIN_API` will be compiled to `let adminAPI = 'xxxxx'`. > write this function `getAdminAPI()`, because it's used many times, in order to reduce redundant code, I think it's best to do so. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services