I want to create a Call.astro button into every blogpost but wanted this button to dynamically change phone-number from the post frontmatter.
I have created the Call.astro button in the component as the following
for types.d.ts
i configured it by adding the phonenumber type into it as a string like the following
import type { AstroComponentFactory } from 'astro/runtime/server/index.js';
import type { HTMLAttributes, ImageMetadata } from 'astro/types';
export interface Post {
/** A unique ID number that identifies a post. */
id: string;
/** A post’s unique slug – part of the post’s URL based on its name, i.e. a post called “My Sample Page” has a slug “my-sample-page”. */
slug: string;
/** */
permalink: string;
/** */
publishDate: Date;
/** */
updateDate?: Date;
/** */
title: string;
/** Optional summary of post content. */
excerpt?: string;
/** */
image?: ImageMetadata | string;
/** */
category?: Taxonomy;
/** */
tags?: Taxonomy[];
/** */
author?: string;
/** */
metadata?: MetaData;
/** */
draft?: boolean;
/** */
Content?: AstroComponentFactory;
content?: string;
/** */
readingTime?: number;
/** The phone number for contact. */
phoneNumber?: string;
}
but i still get undefinied type in the call us button!
Any help is appreactited
I want to create a Call.astro button into every blogpost but wanted this button to dynamically change phone-number from the post frontmatter. I have created the Call.astro button in the component as the following
Then in the SinglePost.astro i update the code into
for types.d.ts i configured it by adding the phonenumber type into it as a string like the following
but i still get undefinied type in the call us button! Any help is appreactited