Skip to content

Commit

Permalink
9
Browse files Browse the repository at this point in the history
to do ,

components id page
  • Loading branch information
kalanakt committed Dec 12, 2022
1 parent e33b3af commit 437eb53
Show file tree
Hide file tree
Showing 7 changed files with 1,435 additions and 327 deletions.
1 change: 0 additions & 1 deletion .env.local.example

This file was deleted.

14 changes: 7 additions & 7 deletions components/ui/Feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ function Feature(){
<div className="flex min-h-screen items-center justify-center p-10 bg-white dark:bg-black pt-8 md:pt-20">
<div className="container grid max-w-screen-xl gap-8 lg:grid-cols-2 lg:grid-rows-2">
<div className="row-span-2 flex flex-col rounded-md border border-slate-200 dark:border-slate-900">
<div className="relative hidden h-1/3 w-full overflow-hidden lg:block">
<div className="absolute top-0">
<Image loader={myLoader} src="https://d33wubrfki0l68.cloudfront.net/c43307b88fb814366e4f3a181c788796cba83faa/4c05c/new/landing/omnichannel.png" className="h-full w-full object-cover object-right-top" alt="omnichannel" />
<div className="relative hidden h-full w-full overflow-hidden lg:block">
<div className="absolute inset-0 top-0">
<Image loader={myLoader} src="https://d33wubrfki0l68.cloudfront.net/c43307b88fb814366e4f3a181c788796cba83faa/4c05c/new/landing/omnichannel.png" className="h-full w-full object-cover object-left-top" alt="hbf" height={200} width={2000} layout='fill' />
</div>
</div>
<div className="p-10">
Expand All @@ -26,9 +26,9 @@ function Feature(){
</div>

<div className="relative hidden h-full w-1/3 overflow-hidden lg:block">
<div className="absolute inset-0">
{/* <div className="absolute inset-0">
<Image loader={myLoader} src="https://d33wubrfki0l68.cloudfront.net/e5290c26cc1703e54e0afe3d1472046098ecd819/53775/new/landing/live-chat.png" className="h-full w-full object-cover object-left-top" alt="" />
</div>
</div> */}
</div>
</div>
<div className="flex rounded-md border border-slate-200 dark:border-slate-900">
Expand All @@ -39,9 +39,9 @@ function Feature(){
</div>

<div className="relative hidden h-full w-1/3 overflow-hidden lg:block">
<div className="absolute inset-0">
{/* <div className="absolute inset-0">
<Image loader={myLoader} src="https://d33wubrfki0l68.cloudfront.net/1205a454c4b64452a51930c9b0043f8db9ff8271/d202e/new/landing/chat-bot.png" className="h-full w-full object-cover object-left-top" alt="" />
</div>
</div> */}
</div>
</div>
</div>
Expand Down
1,362 changes: 1,362 additions & 0 deletions data/components.js

Large diffs are not rendered by default.

110 changes: 20 additions & 90 deletions pages/components/[id].js
Original file line number Diff line number Diff line change
@@ -1,102 +1,32 @@
import Layout from "@components/layout";
import HButton from "@components/hero/HButton";
import Rater from "@components/product/Rater";
import RelatedProjects from "@components/product/RelatedProduct";
import { myLoader } from "@utils/all";
import { components } from "data/components";
import { Data } from "data/Data";
import Image from "next/image";
import Link from "next/link";
import ModalImage from "react-modal-image";

const features = [
{ name: 'Origin', description: 'Designed by Good Goods, Inc.' },
{ name: 'Material', description: 'Solid walnut base with rare earth magnets and powder coated steel card cover' },
{ name: 'Dimensions', description: '6.25" x 3.55" x 1.15"' },
{ name: 'Finish', description: 'Hand sanded and finished with natural oil' },
{ name: 'Includes', description: 'Wood card tray and 3 refill packs' },
{ name: 'Considerations', description: 'Made from natural materials. Grain and color vary with each item.' },
]
export const bundles = [
{
id: 1,
name: "Mega Bundle",
description: "50+ Premium Dashboads And Themes",
},
{
id: 2,
name: "Mega Mobile Bundle",
description: "49 Mobile Aplication Bundle.",
},
{
id: 3,
name: "React Bundle",
description: "15+ React Website Templates.",
},
{
id: 4,
name: "Vue Bundle",
description: "15+ Vue Website Templates.",
},
{
id: 5,
name: "Angular Bundle",
description: "15+ Angular Website Templates.",
},
];

export default function Bundle(props) {
console.log(props.project);
function SingleProduct(props) {
return (
<Layout>
<div className="bg-white dark:bg-black">
<div className="mx-auto grid max-w-2xl grid-cols-1 items-center gap-y-16 gap-x-8 py-8 px-4 lg:max-w-7xl lg:grid-cols-2 lg:px-8">
<div>
<h2 className="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">{props.project.name}</h2>
<p className="mt-4 text-gray-500">
{props.project.description}
</p>

<dl className="mt-16 grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 sm:gap-y-16 lg:gap-x-8">
{features.map((feature) => (
<div key={feature.name} className="border-t border-gray-200 pt-4">
<dt className="font-medium text-gray-900">{feature.name}</dt>
<dd className="mt-2 text-sm text-gray-500">{feature.description}</dd>
</div>
))}
</dl>
</div>
<div className="grid grid-cols-2 grid-rows-2 gap-4 sm:gap-6 lg:gap-8">
<Image
loader={myLoader}
src="https://tailwindui.com/img/ecommerce-images/product-feature-03-detail-01.jpg"
alt="Walnut card tray with white powder coated steel divider and 3 punchout holes."
className="rounded-lg bg-gray-100"
/>
<Image
loader={myLoader}
src="https://tailwindui.com/img/ecommerce-images/product-feature-03-detail-02.jpg"
alt="Top down view of walnut card tray with embedded magnets and card groove."
className="rounded-lg bg-gray-100"
/>
<Image
loader={myLoader}
src="https://tailwindui.com/img/ecommerce-images/product-feature-03-detail-03.jpg"
alt="Side of walnut card tray with card groove and recessed card area."
className="rounded-lg bg-gray-100"
/>
<Image
loader={myLoader}
src="https://tailwindui.com/img/ecommerce-images/product-feature-03-detail-04.jpg"
alt="Walnut card tray filled with cards and card angled in dedicated groove."
className="rounded-lg bg-gray-100"
/>
</div>
</div>
</div>
</Layout>
)
<section className="mb-4 text-slate-600">
hi {console.log(components)}
</section>
);
}

export async function getServerSideProps({ query }) {
const { id } = query;

const { id } = query;
let py= components.map((element) => {
return {...element,subcategory: element.subcategory.filter((subcategory) => subcategory.id === parseInt(id))}
})
console.log(py);
return {
props: {
project: bundles.filter((project) => project.id === parseInt(id))[0],
project: components.filter((project) => project.id === parseInt(id))[0],
},
};
}

export default SingleProduct;
Loading

1 comment on commit 437eb53

@vercel
Copy link

@vercel vercel bot commented on 437eb53 Dec 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vwjswebsite2 – ./

vwjswebsite2-git-master-codexoshop.vercel.app
vwjswebsite2-codexoshop.vercel.app
vwjs.vercel.app

Please sign in to comment.