chore: codify React component style
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
TextInput,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import type { FC } from "react";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useParams } from "react-router";
|
||||
@@ -28,7 +29,11 @@ function dateEnd(value: string) {
|
||||
return value ? `${value}T23:59:59.999Z` : undefined;
|
||||
}
|
||||
|
||||
export function AccountOperationsPage() {
|
||||
type OperationRowProps = {
|
||||
operation: BrokerageOperation;
|
||||
};
|
||||
|
||||
const AccountOperationsPage: FC = () => {
|
||||
const { accountId } = useParams();
|
||||
const { t } = useTranslation();
|
||||
const [from, setFrom] = useState("");
|
||||
@@ -147,10 +152,12 @@ export function AccountOperationsPage() {
|
||||
) : null}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export function OperationRow({ operation }: { operation: BrokerageOperation }) {
|
||||
const OperationRow: FC<OperationRowProps> = (props) => {
|
||||
const { operation } = props;
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Card withBorder>
|
||||
<Group justify="space-between" align="flex-start">
|
||||
@@ -176,4 +183,6 @@ export function OperationRow({ operation }: { operation: BrokerageOperation }) {
|
||||
</Group>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export { AccountOperationsPage, OperationRow };
|
||||
|
||||
Reference in New Issue
Block a user