juzhiyuan commented on a change in pull request #208:
URL: 
https://github.com/apache/incubator-apisix-dashboard/pull/208#discussion_r428632233



##########
File path: src/app.tsx
##########
@@ -31,14 +31,14 @@ export async function getInitialState(): Promise<{
 }
 
 export const layout = ({
-  initialState,
-}: {
+                         initialState,
+                       }: {
   initialState: { settings?: LayoutSettings };
 }): BasicLayoutProps => {
   return {
-    rightContentRender: () => <RightContent />,
+    rightContentRender: () => <RightContent/>,
     disableContentMargin: false,
-    footerRender: () => <Footer />,
+    footerRender: () => <Footer/>,

Review comment:
       lint codes too

##########
File path: src/app.tsx
##########
@@ -85,12 +85,10 @@ const errorHandler = (error: { response: Response; data: 
any }): Promise<Respons
 
 const adminAPIConfig = getAdminAPIConfig();
 export const request: RequestConfig = {
+  prefix: 
`${adminAPIConfig.schema}://${adminAPIConfig.host}${adminAPIConfig.path}${adminAPIConfig.prefix}`,

Review comment:
       how about this?
   
   ```js
   const {key, xxx, xxx} = getAdminAPIConfig()
   ```

##########
File path: src/typings.d.ts
##########
@@ -37,11 +37,17 @@ declare let 
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefine
 
 declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false;
 
-declare let ADMIN_API_SCHEMA; let ADMIN_API_HOST; let ADMIN_API_PATH; let 
API_KEY: '';
+declare let ADMIN_API_SCHEMA;
+declare let ADMIN_API_HOST;
+declare let ADMIN_API_PATH;

Review comment:
       I'm not sure why ADMIN_API_PATH doesn't have initial data, but API_KEY 
has..




----------------------------------------------------------------
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


Reply via email to