Skip to content

Commit

Permalink
fix: fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuuriii committed Nov 15, 2023
1 parent 218e7d4 commit b85bafd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/components/whatIs/card.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import Women from '@/assets/whatIs/women.png';
import Image from 'next/image';
import Image, { StaticImageData } from 'next/image';

interface CardProps {
index: number;
bgImg: StaticImageData;
title: string;
btnText: string;
}

export default function Card({ index, title, btnText }: CardProps) {
export default function Card({ index, bgImg, title, btnText }: CardProps) {
return (
<div
className={`relative flex h-[15rem] w-[20rem] items-center justify-center mb-[1rem] sm:mr-[2rem] bg-women`}
>
<div className='absolute h-[100%] w-[100%] z-[-1]'>
<Image className='h-[100%] w-[100%]' src={Women} alt='' />
<Image className='h-[100%] w-[100%]' src={bgImg} alt='' />
</div>
<div className='flex flex-col items-center justify-center'>
<h1
Expand Down
4 changes: 4 additions & 0 deletions app/components/whatIs/cardData.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import Women from '@/assets/whatIs/women.png';
import Frined from '@/assets/whatIs/friend.png';

export const cardData = [
{
bgImg: Women,
title: 'FOR INSTRUCTORS',
btnText: 'Start a class today',
},
{
bgImg: Frined,
title: 'FOR STUDENTS',
btnText: 'Enter access code',
},
Expand Down
1 change: 1 addition & 0 deletions app/components/whatIs/whatIs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function WhatIs() {
{cardData.map((item, index) => (
<Card
key={index}
bgImg={item.bgImg}
index={index}
title={item.title}
btnText={item.btnText}
Expand Down

0 comments on commit b85bafd

Please sign in to comment.