final

parent cba36eea
import CreateOrder from "@/pages/CreateOrder/CreateOrder" import CreateOrder from "@/pages/CreateOrder/CreateOrder"
import Home from "@/pages/Home/Home"
const HomePage = () => { const HomePage = () => {
return ( return (
<div> <div>
<CreateOrder /> <Home />
</div> </div>
) )
......
.Card { .Card {
min-width: 320; min-width: 320px;
min-height: 100px; min-height: 100px;
background-color: #F1F2F6; background-color: #F1F2F6;
border: 1px solid black; border: 1px solid black;
......
...@@ -6,9 +6,10 @@ import CardButton from "../UI/CardButton/CardButton" ...@@ -6,9 +6,10 @@ import CardButton from "../UI/CardButton/CardButton"
type Props = { type Props = {
url: string url: string
price: string price: string
onClick: string
} }
const Card = ({url, price}: Props) => { const Card = ({url, price, onClick}: Props) => {
return ( return (
<div className={styles.Card}> <div className={styles.Card}>
<Image <Image
...@@ -35,7 +36,7 @@ const Card = ({url, price}: Props) => { ...@@ -35,7 +36,7 @@ const Card = ({url, price}: Props) => {
<p className={styles.Price}>{price} KZT</p> <p className={styles.Price}>{price} KZT</p>
</div> </div>
</div> </div>
<CardButton label={"Let's go"}/> <CardButton onClick={onClick} label={"Let's go"}/>
</div> </div>
) )
} }
......
import Link from 'next/link'
import styles from './CardButton.module.css' import styles from './CardButton.module.css'
type Props = { type Props = {
label: string label: string
onClick: string
} }
const CardButton = ({label}: Props) => { const CardButton = ({label, onClick}: Props) => {
return ( return (
<> <>
<button className={styles.CardButton}>{label}</button> <Link href={onClick} className={styles.CardButton}>{label}</Link>
</> </>
) )
} }
......
const Description = () => {
return(<>asd</>)
}
\ No newline at end of file
.cards {
display: flex;
flex-direction: column;
gap: 28px;
}
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import BackdropWindow from "@/components/BackdropWindow/BackdropWindow" import BackdropWindow from "@/components/BackdropWindow/BackdropWindow"
import styles from './Home.module.css' import styles from './Home.module.css'
import { useState } from "react" import { useState } from "react"
import Card from "@/components/Card/Card"
const Home = () => { const Home = () => {
const [filters, showFilters] = useState(false) const [filters, showFilters] = useState(false)
...@@ -10,6 +11,9 @@ const Home = () => { ...@@ -10,6 +11,9 @@ const Home = () => {
return ( return (
<> <>
<div className={styles.cards}>
<Card url='/image.jpg' price="500" onClick='/description'/>
</div>
<BackdropWindow show={filters} close={() => showFilters(false)}> <BackdropWindow show={filters} close={() => showFilters(false)}>
<p>From</p> <p>From</p>
<input placeholder="Choose country" /> <input placeholder="Choose country" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment