Skip to content

Commit

Permalink
Merge branch 'main' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
XueMoMo committed Sep 21, 2023
2 parents 74f771f + edda871 commit 6085e96
Show file tree
Hide file tree
Showing 8 changed files with 254 additions and 168 deletions.
7 changes: 4 additions & 3 deletions components/modal/ViewBomInfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { FC } from "react";
import { PairInfo } from "./EditorProductSystem";
import { shortStr } from "@lib/utils";
import { handleContentRender } from "utils";
import { isTagType } from "@lib/tagtools";

interface ViewBomInfoModalProps {
onClose: () => void;
Expand All @@ -14,10 +15,10 @@ const ViewBomInfoModal: FC<ViewBomInfoModalProps> = ({ onClose, ...props }) => {
const { modelBomInfo = "" } = props;
const value = modelBomInfo && JSON.parse(modelBomInfo);

const customSort = (a: { tagType: string }, b: { tagType: string }) => {
if (a.tagType === "REFERENCE" && b.tagType !== "REFERENCE") {
const customSort = (a: { tagType: string | string[] }, b: { tagType: string | string[] }) => {
if (isTagType(a.tagType, "REFERENCE") && !isTagType(b.tagType, "REFERENCE")) {
return -1; // 'REFERENCE' 排在前面
} else if (a.tagType !== "REFERENCE" && b.tagType === "REFERENCE") {
} else if (!isTagType(a.tagType, "REFERENCE") && isTagType(b.tagType, "REFERENCE")) {
return 1; // 'REFERENCE' 排在后面
} else {
return 0; // 保持原始顺序
Expand Down
2 changes: 1 addition & 1 deletion components/routes/blockchain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export function Blockchain() {
);
return (
<div className="flex flex-col flex-1 w-full text-black bg-gray-16 min-h-fit">
<header className="bg-green-2 text-white flex items-center h-[4.25rem] px-[4.375rem] w-full">
<header className="bg-green-2 text-white flex items-center h-[4.25rem] w-full">
<SVGAICP fill="#29953A" className="h-[2.25rem] mo:h-[1.75rem] fill-white ml-[3.125rem] mo:ml-4" />
<div className="w-[5.9rem] mo:w-[4.5rem] ml-4 mo:ml-3 text-base mo:text-[0.8rem] mo:leading-[1.125rem]">
{t("Trust Label NFT Viewer")}
Expand Down
2 changes: 1 addition & 1 deletion components/routes/car.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export function Car() {
{isMobile ? (
<>{loading ? <Loading /> : <>{data ? <MobileCar data={data} /> : vin ? <Empty /> : null}</>}</>
) : (
<HeaderLayout className="!px-7">
<HeaderLayout nopx className="!px-7">
{loading ? (
<Loading />
) : (
Expand Down
Loading

0 comments on commit 6085e96

Please sign in to comment.