Files
rdap/src/components/lookup/DomainCard.tsx
Xevion c17f733da1 ci: implement comprehensive CI/CD and workflow automation
- Add GitHub Actions workflows for CI, release, and deployment
- Configure Renovate for automated dependency updates
- Set up Husky pre-commit hooks with lint-staged
- Add commitlint for enforcing Conventional Commits
- Configure semantic-release for automated versioning
- Add Prettier configuration for consistent formatting
- Reformat codebase with new formatting rules
2025-10-22 02:48:18 -05:00

54 lines
1.5 KiB
TypeScript

import type { FunctionComponent } from "react";
import React from "react";
import { rdapStatusInfo } from "@/constants";
import type { Domain } from "@/types";
import Events from "@/components/lookup/Events";
import Property from "@/components/common/Property";
import PropertyList from "@/components/common/PropertyList";
import AbstractCard from "@/components/common/AbstractCard";
export type DomainProps = {
data: Domain;
url?: string;
};
const DomainCard: FunctionComponent<DomainProps> = ({ data, url }: DomainProps) => {
return (
<AbstractCard
data={data}
url={url}
header={
<>
<span className="font-mono tracking-tighter">DOMAIN</span>
<span className="font-mono tracking-wide">
{data.ldhName ?? data.unicodeName}
</span>
<span className="whitespace-nowrap">({data.handle})</span>
</>
}
>
<dl>
{data.unicodeName != undefined ? (
<Property title="Unicode Name">{data.unicodeName}</Property>
) : null}
<Property title={data.unicodeName != undefined ? "LHD Name" : "Name"}>
{data.ldhName}
</Property>
<Property title="Handle">{data.handle}</Property>
<Property title="Events">
<Events key={0} data={data.events} />
</Property>
<PropertyList title="Status">
{data.status.map((statusKey, index) => (
<PropertyList.Item key={index} title={rdapStatusInfo[statusKey]}>
{statusKey}
</PropertyList.Item>
))}
</PropertyList>
</dl>
</AbstractCard>
);
};
export default DomainCard;