Skip to content

Commit

Permalink
fix: rename NGWebsiteReportBadge to ReportModalNameBadge
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoAguzzi committed May 16, 2024
1 parent b92296c commit fc634a4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions apps/website/src/app/components/HeroCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { nameguard } from "@namehash/nameguard";
import { buildENSName } from "@namehash/ens-utils";
import { NGWebsiteReportBadge } from "@namehash/nameguard-react";
import { ReportModalNameBadge } from "@namehash/nameguard-react";

const examples = [
"culturecafé.eth",
Expand Down Expand Up @@ -49,14 +49,14 @@ export async function HeroCarousel() {
badges displayed to enhance badges number.
*/}
{data?.results?.map((report, index) => (
<NGWebsiteReportBadge
<ReportModalNameBadge
key={`carousel-item-${index}`}
ensName={ensNames[index]}
data={report}
/>
))}
{data?.results?.map((report, index) => (
<NGWebsiteReportBadge
<ReportModalNameBadge
key={`carousel-item-${index}`}
ensName={ensNames[index]}
data={report}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ import { ConsolidatedNameGuardReport } from "@namehash/nameguard";
import { useSearchStore } from "../../stores/search";
import { ReportBadge } from "../ReportBadge";

interface NGWebsiteReportBadgeProps {
interface ReportModalNameBadgeProps {
data?: ConsolidatedNameGuardReport;
hadLoadingError?: boolean;
ensName: ENSName;
}

export function NGWebsiteReportBadge({
export function ReportModalNameBadge({
data,
ensName,
hadLoadingError = false,
...props
}: NGWebsiteReportBadgeProps) {
}: ReportModalNameBadgeProps) {
const { openModal } = useSearchStore();
return (
<ReportBadge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@namehash/nameguard";
import { buildENSName } from "@namehash/ens-utils";

import { NGWebsiteReportBadge } from "../Report/NGWebsiteReportBadge";
import { ReportModalNameBadge } from "../Report/ReportModalNameBadge";
import { useSearchStore } from "../../stores/search";
import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/solid";

Expand Down Expand Up @@ -121,14 +121,14 @@ export const SearchEmptyState = () => {
)}
{(hadLoadingError || isLoading) &&
examples.map((_, index) => (
<NGWebsiteReportBadge
<ReportModalNameBadge
hadLoadingError={hadLoadingError}
ensName={examples[index]}
key={index}
/>
))}
{data?.results?.map((report, index) => (
<NGWebsiteReportBadge
<ReportModalNameBadge
key={index}
hadLoadingError={hadLoadingError}
ensName={examples[index]}
Expand Down
2 changes: 1 addition & 1 deletion packages/nameguard-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export { ReportBadge } from "./components/ReportBadge";
export { ReportIcon } from "./components/ReportIcon";
export { CheckResultCodeIcon } from "./components/Report/CheckResultCodeIcon";
export { RatingIcon, RatingIconSize } from "./components/Report/RatingIcon";
export { NGWebsiteReportBadge } from "./components/Report/NGWebsiteReportBadge";
export { ReportModalNameBadge } from "./components/Report/ReportModalNameBadge";

export { RatingLoadingIcon } from "./components/icons/RatingLoadingIcon";
export { RatingUnknownIcon } from "./components/icons/RatingUnknownIcon";
Expand Down

0 comments on commit fc634a4

Please sign in to comment.