Skip to content

Commit

Permalink
remove unwanted code for home view
Browse files Browse the repository at this point in the history
  • Loading branch information
anish-work committed Aug 9, 2024
1 parent 321f022 commit 8dd9fc5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 69 deletions.
41 changes: 1 addition & 40 deletions src/components/shared/Layout/AppLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
import clsx from "clsx";
import { useMemo } from "react";
import HomeIcon from "src/assets/SvgIcons/HomeIcon";

import { addInlineStyle } from "src/addStyles";
import style from "./appLayout.css?inline";
addInlineStyle(style);

type Props = {
children: JSX.Element | JSX.Element[] | (() => JSX.Element);
view?: string;
onViewChange?: (val: string) => void;
};

const getHeightClass = (view: string | undefined) => {
if (view === "messages") return "header-height-full";
return "header-height-0";
};

const AppLayout = ({
children,
view,
onViewChange = () => undefined,
}: Props) => {
const headerHeightClass = useMemo(() => getHeightClass(view), [view]);
return (
<main className="layout-container h-100 d-flex flex-col">
<div
className={clsx("pos-absolute w-100 layout-header", headerHeightClass)}
className={clsx("pos-absolute w-100")}
/>
<>
<div
Expand All @@ -35,31 +21,6 @@ const AppLayout = ({
>
<>{children}</>
</div>

{/* Nav Footer */}
{view === "home" && (
<div className="bg-white nav-footer-container w-100 d-flex">
<div
onClick={() => onViewChange("home")}
className={clsx(
"d-flex flex-col align-center gpt-12 gpb-12 flex-1 cr-pointer",
view === "home" ? "bg-darkGrey text-white" : "hover-bg-primary",
)}
>
<HomeIcon
style={{ width: "24px" }}
className={clsx(view === "home" && "stroke-white")}
/>
<p className="gmt-6">Home</p>
</div>
<div
onClick={() => onViewChange("messages")}
className="d-flex flex-col align-center gpt-12 gpb-12 hover-bg-primary flex-1 cr-pointer"
>
<p className="gmt-6">Chat</p>
</div>
</div>
)}
</>
</main>
);
Expand Down
29 changes: 0 additions & 29 deletions src/components/shared/Layout/appLayout.css

This file was deleted.

0 comments on commit 8dd9fc5

Please sign in to comment.