Skip to content

Commit

Permalink
Merge pull request #47 from AElfProject/feature/left-side-section
Browse files Browse the repository at this point in the history
fix: Removed unused resizable component
  • Loading branch information
yongenaelf authored Oct 8, 2024
2 parents 101b273 + 97e77c4 commit d567e5f
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions components/left-side.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
import { useSearchParams } from "next/navigation";

import { BuildDeployPanel } from "./build-deploy-panel";
import ContractViewer from "./contract-viewer";
import FileExplorer from "./file-explorer";
import TopBottom from "./top-bottom";
import { ResizablePanel } from "./ui/resizable";

const LeftSide = ({ name }: { name: string }) => (
<ResizablePanel defaultSize={25}>
<TopBottom
top={
<>
<BuildDeployPanel />
<FileExplorer />
</>
}
bottom={<ContractViewer name={name} />}
topDefaultSize={30}
bottomDefaultSize={70}
/>
</ResizablePanel>
const TopSections = () => (
<>
<BuildDeployPanel />
<FileExplorer />
</>
);
const LeftSide = ({ name }: { name: string }) => {
const searchParams = useSearchParams();
const contractViewerAddress = searchParams.get("contract-viewer-address");

return (
<ResizablePanel defaultSize={25}>
{contractViewerAddress ? (
<TopBottom
top={<TopSections />}
bottom={<ContractViewer name={name} />}
topDefaultSize={30}
bottomDefaultSize={70}
/>
) : (
<TopSections />
)}
</ResizablePanel>
);
};

export default LeftSide;

0 comments on commit d567e5f

Please sign in to comment.