Skip to content

Commit

Permalink
fix style and add transifex
Browse files Browse the repository at this point in the history
  • Loading branch information
dottyy committed Jun 11, 2024
1 parent b907210 commit 937d28f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Typography } from "@mui/material";
import classNames from "classnames";
import { LabeledClasses } from "react-admin";
import { Else, If, Then } from "react-if";

Expand All @@ -15,7 +16,10 @@ const InformationTabRow = ({ index, type, ...props }: FormSummaryRowProps) => {
{props.step.title}
</Text>
<List
className={`${type == "sites" ? "grid grid-cols-3" : "flex flex-col"} mt-4 gap-4`}
className={classNames("mt-4 gap-4", {
"grid grid-cols-3": type === "sites",
"flex flex-col": type !== "sites"
})}
items={entries}
render={entry => (
<div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useT } from "@transifex/react";
import { useState } from "react";
import { useShowContext } from "react-admin";

Expand Down Expand Up @@ -132,6 +133,7 @@ const StatusDisplay = ({
tab,
viewPD
}: StatusProps) => {
const t = useT();
const { refetch: reloadEntity } = useShowContext();
const [notificationStatus, setNotificationStatus] = useState<{
open: boolean;
Expand All @@ -148,12 +150,12 @@ const StatusDisplay = ({
const { openModal, closeModal } = useModalContext();
const contentStatus = (
<Text variant="text-12-light" as="p" className="text-center">
{DescriptionStatusMap[titleStatus]} <b style={{ fontSize: "inherit" }}>{name}</b>?
{t(DescriptionStatusMap[titleStatus])} <b style={{ fontSize: "inherit" }}>{t(name)}</b>?
</Text>
);
const contentRequest = (
<Text variant="text-12-light" as="p" className="text-center">
{DescriptionRequestMap[titleStatus]} <b style={{ fontSize: "inherit" }}>{name}</b>?
{t(DescriptionRequestMap[titleStatus])} <b style={{ fontSize: "inherit" }}>{t(name)}</b>?
</Text>
);
const filterViewPd = viewPD
Expand Down Expand Up @@ -284,15 +286,15 @@ const StatusDisplay = ({
<div className="flex flex-col items-center gap-4">
<div className="flex w-full items-center gap-4">
<Button className="w-full flex-1 border-[3px] border-primary" onClick={openFormModalHandlerStatus}>
<Text variant="text-12-bold">change status</Text>
<Text variant="text-12-bold">{t("change status")}</Text>
</Button>
<Button
disabled={tab == "polygonReview"}
variant="semi-black"
className={`w-full flex-1 whitespace-nowrap ${tab == "polygonReview" ? "opacity-0" : ""}`}
onClick={openFormModalHandlerRequest}
>
<Text variant="text-12-bold">Change Request</Text>
<Text variant="text-12-bold">{t("Change Request")}</Text>
</Button>
</div>
</div>
Expand Down

0 comments on commit 937d28f

Please sign in to comment.