Skip to content

Commit

Permalink
Hide send button for now
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Nov 25, 2024
1 parent 103c65e commit c579693
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link, useLocation, useParams } from "react-router-dom";
import { Link, useParams } from "react-router-dom";
import {
LayoutContainer,
LayoutContent,
Expand Down Expand Up @@ -55,8 +55,6 @@ export function Asset() {
const { status, data } = useErc721BalancesQuery({ address });
const { indexerUrl } = useIndexerAPI();

const location = useLocation();

const { collection: col, asset } = useMemo<{
collection?: Collection;
asset?: Asset;
Expand Down Expand Up @@ -98,7 +96,7 @@ export function Asset() {
return (
<LayoutContainer
left={
<Link to=".." state={location.state}>
<Link to="..">
<Button variant="icon" size="icon">
<ArrowIcon variant="left" />
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
CardContent,
CardHeader,
CardTitle,
CheckboxIcon,
cn,
CopyAddress,
} from "@cartridge/ui-next";
Expand Down Expand Up @@ -76,7 +75,7 @@ export function Collection() {
};
}, [address, data, indexerUrl]);

if (tokenId) {
if (tokenId || location.pathname.includes("/send")) {
return <Outlet />;
}

Expand Down Expand Up @@ -108,7 +107,7 @@ export function Collection() {
/>

<LayoutContent className="pb-4">
<div
{/* <div
className="flex items-center gap-2 text-sm cursor-pointer self-start"
onClick={() => {
setSearchParams({
Expand All @@ -128,7 +127,7 @@ export function Collection() {
? `${tokenIds.length} selected`
: "Select all"}
</div>
</div>
</div> */}

<div className="grid grid-cols-2 gap-2 place-items-center">
{col.assets.map((a) => {
Expand Down Expand Up @@ -171,11 +170,11 @@ export function Collection() {
});
}}
>
<CheckboxIcon
{/* <CheckboxIcon
variant={
isSelected ? "line" : "unchecked-line"
}
/>
/> */}
</Button>
</div>
</CardHeader>
Expand All @@ -199,11 +198,7 @@ export function Collection() {

{!!tokenIds.length && (
<LayoutFooter>
<Link
to={`/collection/${
col.address
}/send?${searchParams.toString()}`}
>
<Link to={`send?${searchParams.toString()}`}>
<Button className="w-full">
Send ({tokenIds.length})
</Button>
Expand Down

0 comments on commit c579693

Please sign in to comment.