- {ingredient?.count > 0 && (
+ {!!ingredient.count && (
)}
![]()
= ({ children, title, onClose }) => {
{title}
)}
-
+
{children}
diff --git a/src/index.tsx b/src/index.tsx
index 62f1212..a7adeda 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -3,7 +3,7 @@ import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./components/App/App";
import reportWebVitals from "./reportWebVitals";
-import { BrowserRouter as Router } from "react-router-dom";
+import { HashRouter as Router } from "react-router-dom";
import { Provider } from "react-redux";
import { store } from "./store/index";
diff --git a/src/models/api.ts b/src/models/api.ts
index d6d2c9e..541e75b 100644
--- a/src/models/api.ts
+++ b/src/models/api.ts
@@ -1,7 +1,7 @@
export interface BurgerIngredientType {
_id: string;
innerId?: string;
- count: number;
+ count?: number;
name: string;
type: string;
proteins: number;
diff --git a/src/pages/LoginPage/LoginPage.tsx b/src/pages/LoginPage/LoginPage.tsx
index fd34409..6db3dea 100644
--- a/src/pages/LoginPage/LoginPage.tsx
+++ b/src/pages/LoginPage/LoginPage.tsx
@@ -46,7 +46,7 @@ const LoginPage: React.FC = () => {
const { setActive } = useNavHeader();
const {
- auth: { loading, inLoggedIn },
+ auth: { loading },
} = useStore();
const location = useLocation() as LocationStateType;
@@ -70,10 +70,6 @@ const LoginPage: React.FC = () => {
setActive("profile");
}, [setActive]);
- if (inLoggedIn) {
- return