Skip to content

Commit

Permalink
fix: fix all for build
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirDegt committed Apr 16, 2024
1 parent 7a694e7 commit 24f19b1
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 16 deletions.
4 changes: 0 additions & 4 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {Suspense, useEffect} from "react";
import {classNames} from "@/shared/lib/classNames/classNames";
import {Navbar} from "@/widgets/Navbar";
import {Sidebar} from "@/widgets/Sidebar";
import AppRouter from "./providers/router";
import {useTheme} from "./providers/ThemeProvider";
Expand All @@ -9,7 +8,6 @@ import {useDispatch} from "react-redux";
import {userActions} from "@/entities/User";
import {MainLayout} from "@/shared/layouts/MainLayout";
import 'react-toastify/dist/ReactToastify.min.css';
import {Toolbar} from "@/widgets/Toolbar";

document.body.className = localStorage.getItem(LOCAL_STORAGE_THEME_KEY) || 'app_light_theme';

Expand All @@ -25,10 +23,8 @@ export const App = () => {
<div id="app" className={classNames("app_redesigned", {}, [theme])}>
<Suspense fallback="">
<MainLayout
// header={<Navbar/>}
content={<AppRouter/>}
sidebar={<Sidebar/>}
// toolbar={<Toolbar />}
/>
</Suspense>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.container {
width: 430px;
//height: 530px;
}
3 changes: 1 addition & 2 deletions src/pages/TextPage/ui/TextPage.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {TextEditor} from "@/features/TextEditor";

const TextPage = () => {

return (
<main>
<TextEditor/>
TextPage
</main>
)
};
Expand Down
3 changes: 0 additions & 3 deletions src/shared/config/routeConfig/routeConfig.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { AboutPage } from "@/pages/AboutPage";
import { MainPage } from "@/pages/MainPage";
import { NotFoundPage } from "@/pages/NotFoundPage";
import { ProfilePage } from "@/pages/ProfilePage";
import { TextPage } from "@/pages/TextPage";
import { RouteProps } from "react-router-dom";
import {CatalogPage} from "@/pages/CatalogPage";
import {FavoritePage} from "@/pages/FavoritePage";
Expand Down
6 changes: 6 additions & 0 deletions src/shared/ui/Card/Card.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@
gap: 10px;
}

.btn_heart {
display: flex;
align-items: center;
justify-content: center;
}

2 changes: 1 addition & 1 deletion src/shared/ui/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const dispatch = useDispatch();
theme={ButtonTheme.CLEAR}
onClick={handleClickHeart}
disabled={isDisabled}
className={cls.btn_heart}
>
{favorite
? <Icon
Expand All @@ -100,7 +101,6 @@ const dispatch = useDispatch();
/>}
</Button>
</div>

</div>
<div className={cls.location}>
<h2>{rating}({reviews.length} Reviews)</h2>
Expand Down
6 changes: 4 additions & 2 deletions src/shared/ui/Card/Details/Category/Adults.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import cls from "./Category.module.scss";
import {Icon} from "@/shared/ui/Icon/Icon";
import IconAdults from "@/shared/assets/icons/categories/adults.svg"
export const Adults = ({value}: string | number) => {
import IconAdults from "@/shared/assets/icons/categories/adults.svg";
import {CategoryProps} from "@/shared/ui/Card/Details/types/categories";

export const Adults = ({value}: CategoryProps) => {

return (
<div className={cls.container}>
Expand Down
3 changes: 2 additions & 1 deletion src/shared/ui/Card/Details/Category/AirConditioner.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import cls from "./Category.module.scss";
import {Icon} from "@/shared/ui/Icon/Icon";
import Svg from "@/shared/assets/icons/categories/AirConditioner.svg"
export const AirConditioner = ({value}: string | number) => {
import {CategoryProps} from "@/shared/ui/Card/Details/types/categories";
export const AirConditioner = ({value}: CategoryProps) => {

return (
<div className={cls.container}>
Expand Down
3 changes: 2 additions & 1 deletion src/shared/ui/Card/Details/Category/Bed.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import cls from "./Category.module.scss";
import {Icon} from "@/shared/ui/Icon/Icon";
import Svg from "@/shared/assets/icons/categories/Bed.svg"
export const Bed = ({value}: string | number) => {
import {CategoryProps} from "@/shared/ui/Card/Details/types/categories";
export const Bed = ({value}: CategoryProps) => {

return (
<div className={cls.container}>
Expand Down
3 changes: 2 additions & 1 deletion src/shared/ui/Card/Details/Category/Hob.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import cls from "./Category.module.scss";
import {Icon} from "@/shared/ui/Icon/Icon";
import Svg from "@/shared/assets/icons/categories/Hob.svg"
export const Hob = ({value}: string | number) => {
import {CategoryProps} from "@/shared/ui/Card/Details/types/categories";
export const Hob = ({value}: CategoryProps) => {

return (
<div className={cls.container}>
Expand Down
3 changes: 3 additions & 0 deletions src/shared/ui/Card/Details/types/categories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface CategoryProps {
value: string | number
}

0 comments on commit 24f19b1

Please sign in to comment.