-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathTitleCell.tsx
More file actions
49 lines (47 loc) · 1.25 KB
/
TitleCell.tsx
File metadata and controls
49 lines (47 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import type { OracleQueryUI } from "@/types";
import { ChainNameAndIcon } from "../ChainNameAndIcon";
import { TruncatedTitle } from "../TruncatedTitle";
import {
TextWrapper,
TitleHeader,
TitleTD,
TitleText,
TitleWrapper,
} from "./style";
/**
* Renders the title cell for a table row
* This is the first cell in the row
* It shows the title, project, time, and chain name
* @param title - the title of the query
* @param project - the project of the query
* @param chainName - the chain name of the query
* @param timeFormatted - the time of the query
* @param expiryType - the expiry type of the query
*/
export function TitleCell({
title,
project,
chainName,
chainId,
timeFormatted,
expiryType,
}: OracleQueryUI) {
const isKnownProject = project !== "Unknown";
return (
<TitleTD>
<TitleWrapper>
<TextWrapper>
<TitleHeader>
<TruncatedTitle title={title} />
</TitleHeader>
<TitleText>
{isKnownProject && `${project} | `}
{timeFormatted} |{" "}
<ChainNameAndIcon chainId={chainId} chainName={chainName} />{" "}
{expiryType && `| ${expiryType}`}
</TitleText>
</TextWrapper>
</TitleWrapper>
</TitleTD>
);
}