Skip to content

Commit

Permalink
Typing props
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaaaavier committed Nov 28, 2024
1 parent 0e8b77b commit 0e26113
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/assets/types/have-i-been-pawned.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export interface CtaSection {
title: string;
description: string;
cta: string;
redirect?: string;
redirect: string;
}

export interface FeatureSection {
title: string;
description: string;
description2: string;
cards: CtaSection[];
cards: CtaSection;
}

export interface FeatureSectionV2 {
Expand Down
5 changes: 4 additions & 1 deletion src/components/monitor/FeatureSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import Card from '../shared/Card';
export interface FeatureSectionProps {
textContent: HaveIbeenPwnedText['FeatureSection'];
}
const CardText = ({ textContent }) => {
export interface CardTextProps {
textContent: HaveIbeenPwnedText['FeatureSection']['cards'];
}
const CardText = ({ textContent }: CardTextProps) => {
const router = useRouter();

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/monitor/PwnedElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const PwnedElementCard: React.FC<PwnedElementCardProps> = ({ textContent }) => {
className="text-regular text-base text-gray-80 md:text-lg"
dangerouslySetInnerHTML={{ __html: sanitizedHTML }}
/>
;

<div className="inline-flex flex-wrap items-center gap-x-1 text-base text-gray-80 md:text-lg">
<span className="font-bold">{textContent.compromisedData}</span>
{textContent.dataClasses.map((dataClass, index) => (
Expand Down

0 comments on commit 0e26113

Please sign in to comment.