VictorVM7 / Scrimba

Scrimba React Course
0 stars 0 forks source link

Importing file path not working well #8

Closed VictorVM7 closed 2 weeks ago

VictorVM7 commented 2 weeks ago

Verifiy why the file path when importing is getting wrong or working not so well as it should.

VictorVM7 commented 2 weeks ago

It's necessary to change to a .ts file and include export interface as it follows:

export interface CardData {
    id: number;
    img: string;
    title: string;
    description: string;
    price: number;
    stats: {
        rating: number;
        reviewCount: number;
    };
    location: string;
    openSpots: number;
}

export const CardsData: CardData[] = [
    {
        id: 1,
        title: "Life Lessons with Katie Zaferes",
        description: "I will share with you what I call \"Positively Impactful Moments of Disappointment.\" Throughout my career, many of my highest moments only came after setbacks and losses. But learning from those difficult moments is what gave me the ability to rise above them and reach my goals.",
        price: 136,
        img: "public/images/cards/katie-zaferes.png",
        stats: {
            rating: 5.0,
            reviewCount: 6
        },
        location: "Online",
        openSpots: 0,
    },
    {
        id: 2,
        title: "Learn Wedding Photography",
        description: "Interested in becoming a wedding photographer? For beginner and experienced photographers alike, join us in learning techniques required to leave the happy couple with memories that'll last a lifetime.",
        price: 125,
        img: "public/images/cards/wedding-photography.png",
        stats: {
            rating: 5.0,
            reviewCount: 30
        },
        location: "Online",
        openSpots: 27,
    },
    {
        id: 3,
        title: "Group Mountain Biking",
        description: "Experience the beautiful Norwegian landscape and meet new friends all while conquering rugged terrain on your mountain bike. (Bike provided!)",
        price: 50,
        img: "public/images/cards/mountain-bike.png",
        stats: {
            rating: 4.8,
            reviewCount: 2
        },
        location: "Norway",
        openSpots: 3,
    }
];