Skip to content

Commit

Permalink
Keep showing project details card
Browse files Browse the repository at this point in the history
  • Loading branch information
atrincas committed Nov 26, 2024
1 parent 7498c49 commit 2d649f5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import InfoButton from "@/components/ui/info-button";

const Header: FC = () => {
return (
<header className="flex items-center justify-between">
<h2 className="text-base font-semibold">Annual project cash flow</h2>
<header className="flex items-center justify-between py-2">
<h2 className="pl-4 text-base font-semibold">Annual project cash flow</h2>
<Tabs />
<InfoButton title="tooltip title">tooltip.content</InfoButton>
<div className="flex items-center p-3">
<InfoButton title="tooltip title">tooltip.content</InfoButton>
</div>
</header>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Card } from "@/components/ui/card";

const AnnualProjectCashFlow: FC = () => {
return (
<Card variant="secondary">
<Card variant="secondary" className="p-0">
<Header />
</Card>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const ProjectCost: FC = () => {
</CardHeader>

<CardContent className="px-4 pb-4">
<div className="flex justify-between gap-[100px]">
<div className="flex justify-between gap-4">
<div className="flex max-w-[148px] flex-1 flex-col justify-between">
<div>
<span className="text-xl font-normal">
Expand Down
11 changes: 1 addition & 10 deletions client/src/containers/projects/custom-project/details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import { FC } from "react";
import { ACTIVITY } from "@shared/entities/activity.enum";
import { CARBON_REVENUES_TO_COVER } from "@shared/entities/carbon-revenues-to-cover.enum";
import { ECOSYSTEM } from "@shared/entities/ecosystem.enum";
import { useAtomValue } from "jotai";

import { cn } from "@/lib/utils";

import { projectsUIState } from "@/app/projects/[id]/store";

import DetailItem from "@/containers/projects/custom-project/details/detail-item";

Expand Down Expand Up @@ -42,12 +37,8 @@ const ProjectDetails: FC<ProjectDetailsProps> = ({
lossRate,
emissionFactors,
}) => {
const { projectSummaryOpen } = useAtomValue(projectsUIState);

return (
<Card
className={cn({ "flex-2 space-y-1": true, hidden: projectSummaryOpen })}
>
<Card className="flex-1 space-y-1">
<div className="flex items-center justify-between">
<h2 className="text-base font-semibold">Project details</h2>
<Button type="button" variant="ghost">
Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/projects/custom-project/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const {
initialCarbonPrice,
emissionFactors,
} = mockData;
export const SUMMARY_SIDEBAR_WIDTH = 460;
export const SUMMARY_SIDEBAR_WIDTH = 400;
const CustomProject: FC = () => {
const { projectSummaryOpen } = useAtomValue(projectsUIState);
const { open: navOpen } = useSidebar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const LeftOver: FC = () => {
</CardHeader>

<CardContent className="px-4 pb-4">
<div className="flex justify-between gap-[100px]">
<div className="flex justify-between gap-4">
<div className="flex max-w-[148px] flex-1 flex-col justify-between">
<div>
<span className="text-xl font-normal">
Expand Down

0 comments on commit 2d649f5

Please sign in to comment.