@asaleh37/ui-base 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -26,7 +26,7 @@ const App: React.FC<AppInfo> = (props: AppInfo) => {
26
26
  }, []);
27
27
  return (
28
28
  <ThemeProvider theme={theme}>
29
- <Layout />
29
+ {props?.apiBaseUrl ? <Layout /> : <>No Info Yet</>}
30
30
  </ThemeProvider>
31
31
  );
32
32
  };
@@ -36,6 +36,8 @@ const Login: React.FC = () => {
36
36
  }
37
37
  setIsLoginInProcess(true);
38
38
  let response: any = null;
39
+ console.log("login appinfo", appInfo);
40
+ debugger;
39
41
  try {
40
42
  response = await axios.post(
41
43
  `${appInfo.apiBaseUrl}/api/auth/login`,
@@ -1,11 +1,11 @@
1
1
  import { createSlice } from "@reduxjs/toolkit";
2
2
 
3
3
  export type AppInfo = {
4
- documentTitle: string;
5
- apiBaseUrl: string;
6
- appName: string;
7
- appVersion: string;
8
- appLogo: any;
4
+ documentTitle: string | null;
5
+ apiBaseUrl: string | null;
6
+ appName: string | null;
7
+ appVersion: string | null;
8
+ appLogo: any | null;
9
9
  };
10
10
 
11
11
  export type AppInfoProp = {
@@ -14,10 +14,10 @@ export type AppInfoProp = {
14
14
 
15
15
  const initialState: AppInfoProp = {
16
16
  value: {
17
- documentTitle: "",
18
- apiBaseUrl: "",
19
- appName: "",
20
- appVersion: "",
17
+ documentTitle: null,
18
+ apiBaseUrl: null,
19
+ appName: null,
20
+ appVersion: null,
21
21
  appLogo: null,
22
22
  },
23
23
  };