Skip to content

Commit

Permalink
feat(baseline): asterisk support for baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Jan 7, 2025
1 parent 210442b commit 7ccf325
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion client/src/document/baseline-indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ const LOCALIZED_BCD_IDS = {
const SURVEY_URL =
"https://survey.alchemer.com/s3/7634825/MDN-baseline-feedback";

export function BaselineIndicator({ status }: { status: SupportStatus }) {
export function BaselineIndicator({
status,
}: {
status: SupportStatus & { asterisk?: boolean };
}) {
const gleanClick = useGleanClick();
const locale = useLocale();
const { pathname } = useLocation();
Expand Down Expand Up @@ -123,6 +127,7 @@ export function BaselineIndicator({ status }: { status: SupportStatus }) {
? "Widely available"
: low_date?.getFullYear()}
</span>
{status.asterisk ? " *" : ""}
</>
) : (
<span className="not-bold">Limited availability</span>
Expand Down
2 changes: 1 addition & 1 deletion libs/types/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export interface DocMetadata {
popularity?: number; // Used for search.
noIndexing?: boolean;
browserCompat?: string[];
baseline?: SupportStatus;
baseline?: SupportStatus & { asterisk?: boolean };
hash?: string;
pageType: string;
}
Expand Down

0 comments on commit 7ccf325

Please sign in to comment.