Skip to content

Commit

Permalink
feat(feature)-improvsingleproductview-#187893630
Browse files Browse the repository at this point in the history
  • Loading branch information
kayigmb committed Jul 10, 2024
1 parent 09b247f commit b3de62b
Show file tree
Hide file tree
Showing 24 changed files with 217 additions and 750 deletions.
120 changes: 120 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions src/__tests__/ZcartManagement.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,6 @@ describe('userCartSlice', () => {
// Assertions
expect(mockedRequest.put).toHaveBeenCalledWith('/carts', expectedItems);
const actions = dispatch.mock.calls.map((call) => call[0]);
console.log(
'1111111111111111111111111111111111111111111111111111111111111111111111111111111',
result,
);
expect(result.payload).toEqual({ data: 'success' });
expect(actions[0].type).toBe(handleRemoveItemInCart.pending.type);
expect(actions[1].type).toBe(handleRemoveItemInCart.rejected.type);
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/app.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ describe('Signup Components', () => {
expect(screen.getByPlaceholderText('Confirm Password')).toBeInTheDocument();
});
it('displays error message on Signup failure', async () => {
console.log('this is env cccccccccccccccccccccc', process.env.URL);
mockaxios.onPost(`${process.env.URL}/users/signup`).reply(409, {
message: 'User with this email already exists',
});
Expand Down
51 changes: 0 additions & 51 deletions src/__tests__/sellerOrders.test.tsx

This file was deleted.

60 changes: 0 additions & 60 deletions src/__tests__/sellerProduct.test.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/dashboard/addproduct/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function page() {
<LayoutDashboard pageName="Create Product" isLoading={!user ? true : false}>
<ProductPopup isOpen={true} onClose={() => console.log('nothing')} />;
</LayoutDashboard>
);
)
}

export default page;
6 changes: 3 additions & 3 deletions src/app/dashboard/product_/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ function page() {
<ProductPopup
product={product}
isOpen={true}
onClose={() => console.log('nothing')}
onClose={() => router.back()}
/>
;

</LayoutDashboard>
);
)
}

export default page;
10 changes: 6 additions & 4 deletions src/app/dashboard/users/page.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
'use client';
import React, { use, useEffect, useState } from 'react';
import DashNavbar from '@/components/DashNavbar';
import HeaderDash from '@/components/headerDash';
import UsersPageAdmin from '@/components/UsersAdmin';
import LayoutDashboard from '@/components/LayoutDashboard';
import { useRouter } from 'next/navigation';

function page() {
const [user, setUser] = useState<any>();
const [user, setUser] = useState<any>();
const router = useRouter()
useEffect(() => {
const categ = async () => {
const user = localStorage.getItem('profile') || '';
const finalUser = JSON.parse(user);

if (finalUser.User.Role.name !== 'admin') {
router.back();
}
setUser(finalUser?.User);
console.log(finalUser);
};
Expand Down
68 changes: 0 additions & 68 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,74 +106,6 @@ body {}
}
}

/* swipe */
.swiper {
width: 100%;
height: 50%;
}

.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;

/* Center slide text vertically */
display: flex;
justify-content: center;
align-items: center;
}

.swiper-slide img {
display: block;
width: 100%;
height: 50%;
object-fit: cover;
}

.swiper {
/* Down */
width: 50%;
height: 300px;
margin-left: auto;
margin-right: auto;
}

.swiper-slide {
width: 100%;
background-size: fit;
background-position: center;
}

.mySwiper {
/* low division */
width: 100%;
height:100%;
box-sizing: border-box;
}

.mySwiper .swiper-slide {
/* low single img card */
width: 25%;
height: 50%;
opacity: 0.4;
}
.mySwiper2 {
/* high division */
width: 100%;
display: block;
object-fit: cover;
}

.mySwiper .swiper-slide-thumb-active {
opacity: 1;
}
.mySwiper4 .swiper-slide-thumb-active {
opacity: 1;
}

.swiper-slide img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
Loading

0 comments on commit b3de62b

Please sign in to comment.