mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
revert navlink card changes
This commit is contained in:
1 parent
e31d22ec7f
commit
4b29aaa70c
2 files changed
+26
-27
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Link, useHistory } from "react-router-dom";
|
||||
// import { Link, useHistory } from "react-router-dom";
|
||||
import Card from "../Card";
|
||||
import AudioPlayer from "components/common/AudioPlayer";
|
||||
import useTimeAgo from "hooks/useTimeAgo";
|
||||
@@ -12,8 +12,7 @@ import Button from "components/common/Button";
|
||||
import useWeightTypeInfo from "hooks/useWeightTypeInfo/useWeightTypeInfo";
|
||||
import WeightCoverImage from "components/common/WeightCoverImage";
|
||||
import { BucketConfig } from "@storyteller/components/src/api/BucketConfig";
|
||||
// import useToken from "hooks/useToken";
|
||||
import getCardUrl from "../getCardUrl";
|
||||
// import getCardUrl from "../getCardUrl";
|
||||
|
||||
interface AudioCardProps {
|
||||
bookmarks?: any;
|
||||
@@ -25,7 +24,7 @@ interface AudioCardProps {
|
||||
type: "media" | "weights";
|
||||
inSelectModal?: boolean;
|
||||
onResultSelect?: (data:{token: string, title:string}) => void;
|
||||
onClick?: (e:any) => any;
|
||||
// onClick?: (e:any) => any;
|
||||
}
|
||||
|
||||
export default function AudioCard({
|
||||
@@ -37,12 +36,12 @@ export default function AudioCard({
|
||||
source = "",
|
||||
type,
|
||||
inSelectModal = false,
|
||||
onClick: inClick,
|
||||
// onClick: inClick,
|
||||
onResultSelect,
|
||||
}: AudioCardProps) {
|
||||
// const { setToken, setWeightTitle } = useToken();
|
||||
const linkUrl = getCardUrl(data,source,type);
|
||||
const history = useHistory();
|
||||
// const linkUrl = getCardUrl(data,source,type);
|
||||
// const history = useHistory();
|
||||
|
||||
const handleInnerClick = (event: any) => {
|
||||
event.stopPropagation();
|
||||
@@ -168,27 +167,27 @@ export default function AudioCard({
|
||||
<div className="d-flex flex-grow-1">
|
||||
<Badge label={weightBadgeLabel} color={weightBadgeColor} />
|
||||
</div>
|
||||
{inClick ? (
|
||||
{/* {inClick ? (
|
||||
<Button
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
variant="link"
|
||||
label="Select"
|
||||
className="fs-7"
|
||||
onClick={handleSelectModalResultSelect}
|
||||
onClick={() => {
|
||||
history.push(linkUrl);
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
) : ( */}
|
||||
<Button
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
variant="link"
|
||||
label="Use"
|
||||
className="fs-7"
|
||||
onClick={() => {
|
||||
history.push(linkUrl);
|
||||
}}
|
||||
onClick={handleSelectModalResultSelect}
|
||||
/>
|
||||
)}
|
||||
{/* )} */}
|
||||
</div>
|
||||
|
||||
<div className="d-flex align-items-center mt-3">
|
||||
@@ -261,18 +260,18 @@ export default function AudioCard({
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
{inClick ? (
|
||||
// <>
|
||||
// {inClick ? (
|
||||
<>{card}</>
|
||||
) : (
|
||||
<Link
|
||||
{...{
|
||||
to: linkUrl
|
||||
}}
|
||||
>
|
||||
{card}
|
||||
</Link>
|
||||
)}
|
||||
</>
|
||||
// ) : (
|
||||
// <Link
|
||||
// {...{
|
||||
// to: linkUrl
|
||||
// }}
|
||||
// >
|
||||
// {card}
|
||||
// </Link>
|
||||
// )}
|
||||
// </>
|
||||
);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ function SdInferencePanel({
|
||||
const [weightToken, setWeightToken] = useState(sd_model_token);
|
||||
|
||||
const handleOnWeightSelect = (data:{token:string,title:string}) => {
|
||||
setLoraToken(data.token);
|
||||
setWeightToken(data.token);
|
||||
};
|
||||
const handleOnSelect = (data:{token:string,title:string}) => {
|
||||
setLoraToken(data.token);
|
||||
|
||||
Reference in new issue
Block a user