Skip to content

Commit

Permalink
last cell utils visible, settings owner wallet fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed May 28, 2024
1 parent bda3fa9 commit de3825c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions next_app/src/components/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ const VisualCell = (
</div>
}

const CellUtilButtons = ({ position, addNewCell }: { position: number, addNewCell: (foo?: number, type?: "CODE" | "MARKDOWN" | "LATEX") => void }) => {
const [visible, setVisible] = useState(false);
return <div className="relative" onMouseEnter={() => setVisible(true)} onMouseLeave={() => setVisible(false)}>
const CellUtilButtons = ({ defaultVisible = false, position, addNewCell }: { defaultVisible?: boolean, position: number, addNewCell: (foo?: number, type?: "CODE" | "MARKDOWN" | "LATEX") => void }) => {
const [visible, setVisible] = useState(defaultVisible);
return <div className="relative" onMouseEnter={() => setVisible(true)} onMouseLeave={() => setVisible(defaultVisible)}>
<div data-visible={visible}
className="h-3.5 w-5/6 mx-auto relative gap-2 text-center flex items-center text-btr-grey-1 z-10 overflow-visible text-xs justify-center data-[visible=true]:visible data-[visible=false]:invisible">
<div className="grow h-[1px] bg-btr-grey-1"></div>
Expand Down Expand Up @@ -518,7 +518,8 @@ $$\\int_a^b f'(x) dx = f(b)- f(a)$$`,
>
+ Add new cell
</Button> */}
<CellUtilButtons position={file.content.cellOrder.length} addNewCell={addNewCell} />
<div className="mt-2"></div>
<CellUtilButtons defaultVisible position={file.content.cellOrder.length} addNewCell={addNewCell} />
</>
) : (
<>
Expand Down
2 changes: 1 addition & 1 deletion next_app/src/components/settings-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function SettingsTab() {
<Title title="CURRENT PROJECT" />
<div className="my-8 grid grid-cols-3 items-center">
<div>Owner Wallet</div>
<div className="col-span-2">{project.ownerWallet || "NA"}</div>
<div className="col-span-2">{typeof project.ownerWallet == "string" ? project.ownerWallet : "NA"}</div>
<div>Current Process</div>
<div className="col-span-2">{project.process || "NA"}</div>
<div>Default Filetype</div>
Expand Down

0 comments on commit de3825c

Please sign in to comment.