Skip to content

Commit

Permalink
Done: Frontend links updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
risingstar0225 committed Dec 18, 2023
1 parent 46a5517 commit 23665cf
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 95 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode/
frontend/package-lock.json
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ yarn-error.log*
#
package-lock.json
frontend/package-lock.json
/package-lock.json
10 changes: 4 additions & 6 deletions frontend/Components/Cart/CartPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ const CartPage = () => {
<div className="flex justify-between items-center mt-6 pt-6 border-t">
<div className="flex items-center">
<Link href="/products">
<a>
<i className="fa fa-arrow-left text-sm pr-2"></i>
<span className="text-md font-medium text-blue-500">
Continue Shopping
</span>
</a>
<i className="fa fa-arrow-left text-sm pr-2"></i>
<span className="text-md font-medium text-blue-500">
Continue Shopping
</span>
</Link>
</div>
<div className="flex justify-center items-end">
Expand Down
6 changes: 2 additions & 4 deletions frontend/Components/Common/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ const Header = () => {
<ul className="hidden lg:flex col-start-4 col-end-8 text-black-500 items-center">
{categories?.length > 0 && categories?.map(category => {
return (
<Link key={category?.id} href={`/category/${category?.name}`}>
<a className="px-4 py-2 mx-2 cursor-pointer animation-hover inline-block relative text-black-500 hover:text-orange-500">
{category?.name}
</a>
<Link key={category?.id} href={`/category/${category?.name}`} className="px-4 py-2 mx-2 cursor-pointer animation-hover inline-block relative text-black-500 hover:text-orange-500">
{category?.name}
</Link>
)
})}
Expand Down
14 changes: 5 additions & 9 deletions frontend/Components/Common/HeaderRight.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ const HeaderRight = () => {
{accessToken
? (
<>
{/* <Link href='/user/profile' >
<a className="text-black-600 mx-2 sm:mx-4 capitalize tracking-wide hover:text-orange-500 transition-all" >
My Profile
</a>
</Link > */}
<Link href='/user/profile' className="text-black-600 mx-2 sm:mx-4 capitalize tracking-wide hover:text-orange-500 transition-all" >
My Profile
</Link >
<MyAccountPopover />
<button
className="text-black-600 mx-1 sm:mx-1 capitalize tracking-wide hover:text-orange-500 transition-all"
Expand All @@ -46,10 +44,8 @@ const HeaderRight = () => {
)
: (
<>
<Link href='/auth/login' >
<a className="text-black-600 mx-2 sm:mx-4 capitalize tracking-wide hover:text-orange-500 transition-all" >
Sign In
</a>
<Link href='/auth/login' className="text-black-600 mx-2 sm:mx-4 capitalize tracking-wide hover:text-orange-500 transition-all" >
Sign In
</Link >
<Link href={'/auth/register'} >
<button className="font-medium tracking-wide py-2 px-5 sm:px-8 border border-orange-500 text-orange-500 bg-white-500 outline-none rounded-l-full rounded-r-full capitalize hover:bg-orange-500 hover:text-white-500 transition-all hover:shadow-orange border-blue-600 hover:bg-blue-200 hover:shadow-inner font-bold">
Expand Down
4 changes: 1 addition & 3 deletions frontend/Components/Products/FeatureProducts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ const FeatureProducts = () => {
</div>
<div className="text-center center-block mb-16 text-5xl">
{/* <b className='capitalize italic border-b-8 rounded-b-3xl border-t-8 rounded-t-3xl border-pink-900 px-6 py-5'> */}
<Link href="/products">
<a className="shadow-lg hover:shadow-2xl text-black bg-yellow-500 hover:bg-yellow-400 focus:ring-4 focus:ring-yellow-400 font-large rounded-lg font-black text-lg px-6 py-3 text-center inline-flex items-center">
<Link href="/products" className="shadow-lg hover:shadow-2xl text-black bg-yellow-500 hover:bg-yellow-400 focus:ring-4 focus:ring-yellow-400 font-large rounded-lg font-black text-lg px-6 py-3 text-center inline-flex items-center">
View All Products
</a>
</Link>
{/* </b> */}
</div>
Expand Down
4 changes: 0 additions & 4 deletions frontend/Components/Products/ProductCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const ProductCard = ({ product }) => {
<div className="max-w-lg mx-auto">
<div className="bg-white shadow-md border border-gray-200 rounded-lg max-w-full mb-5">
<Link href={PRODUCT_URL}>
<a >
{product.product_images ? <Image
width="100%" height="100%" layout="responsive"
src={product.product_images[0].image}
Expand All @@ -24,15 +23,12 @@ const ProductCard = ({ product }) => {
:
product.name
}
</a>
</Link>
<div className="p-5 bg-indigo-100">
<Link href={PRODUCT_URL}>
<a >
<h5 className="text-gray-900 font-bold text-2xl tracking-tight mb-2">
{product.name}
</h5>
</a>
</Link>
<p className="font-sm text-gray-700 mb-3">
{product?.short_description}
Expand Down
4 changes: 1 addition & 3 deletions frontend/Components/Products/RecentProducts/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ const RecentProducts = () => {
</div>
<div className="text-center center-block mb-16 text-5xl">
{/* <b className='capitalize italic border-b-8 rounded-b-3xl border-t-8 rounded-t-3xl border-pink-900 px-6 py-5'> */}
<Link href="/products">
<a className="shadow-lg hover:shadow-2xl text-black bg-yellow-500 hover:bg-yellow-400 focus:ring-4 focus:ring-yellow-400 font-large rounded-lg font-black text-lg px-6 py-3 text-center inline-flex items-center">
<Link href="/products" className="shadow-lg hover:shadow-2xl text-black bg-yellow-500 hover:bg-yellow-400 focus:ring-4 focus:ring-yellow-400 font-large rounded-lg font-black text-lg px-6 py-3 text-center inline-flex items-center">
View All Products
</a>
</Link>
{/* </b> */}
</div>
Expand Down
2 changes: 0 additions & 2 deletions frontend/Components/UI/CartIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Link from 'next/link'
const CartIcon = ({ cartCounter }) => {
return (
<Link href={`/carts`}>
<a href="">
<span className="relative inline-block">
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6 hover:text-yellow-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" />
Expand All @@ -14,7 +13,6 @@ const CartIcon = ({ cartCounter }) => {
</span>
)}
</span>
</a>
</Link>
);
}
Expand Down
98 changes: 51 additions & 47 deletions frontend/Components/UI/MyAccountPopover/index.jsx
Original file line number Diff line number Diff line change
@@ -1,68 +1,72 @@
import { useState } from "react";


function Index() {
const [show, setShow] = useState(false)
return (
<>
{/* Code block starts */}
<div id="popover" className="transition duration-150 ease-in-out -mt-16 absolute top-0 left-0 ml-20 w-full sm:w-1/2">
<div className="w-full bg-white rounded shadow-2xl">
{show && (
<div id="popover" className="transition duration-150 ease-in-out -mt-16 absolute top-0 left-0 ml-20 w-full sm:w-1/2">
<div className="w-full bg-white rounded shadow-2xl">

<div className="w-full h-full px-4 xl:px-8 py-5">
<div className="w-full h-full px-4 xl:px-8 py-5">

<hr className="my-5 border border-gray-200" />
<div className="w-full h-full pb-5 lg:pb-10">
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
My Account
</h3>
</div>
</div>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
My Orders
</h3>
<div className="w-full h-full pb-5 lg:pb-10">
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
My Account
</h3>
</div>
</div>
</div>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
My Payment History
</h3>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
My Orders
</h3>
</div>
</div>
</div>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
Account & Security
</h3>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
My Payment History
</h3>
</div>
</div>
</div>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
Notifications
</h3>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
Account & Security
</h3>
</div>
</div>
</div>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
Logout
</h3>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
Notifications
</h3>
</div>
</div>
<hr className="my-5 border border-gray-200" />
<div className="flex justify-between items-center">
<div className="flex items-center">
<h3 className="mb-2 sm:mb-1 text-gray-800 text-base font-normal leading-4">
Logout
</h3>
</div>
</div>
<hr className="my-5 border border-gray-200" />
</div>
<hr className="my-5 border border-gray-200" />
</div>
</div>
</div>
</div>
)}
{/* Code block ends */}
</>
);
Expand Down
Loading

0 comments on commit 23665cf

Please sign in to comment.