Skip to content

Commit

Permalink
Merge branch 'develop' into ft-bestSellingProducts
Browse files Browse the repository at this point in the history
merge develop
  • Loading branch information
EddyShimwa committed Jul 22, 2024
2 parents 67ff6e4 + f971084 commit b7e9335
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/components/Popular/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ interface MostPopularItemProps {
function SingleItem({ product }: MostPopularItemProps) {
return (
<div className=" flex flex-row hover:scale-105 hover:translate-y-0.5 hover:translate-x-0.5">
<div className=" max-h-20 max-w-20 ">
<img src={product.image} alt={product.name} className=" rounded" />
<div className=" flex flex-row items-center justify-center h-20 w-20 ">
<img
src={product.image}
alt={product.name}
className=" max-h-20 max-w-20 rounded"
/>
</div>
<div className=" flex flex-col justify-between py-2 pl-1">
<div>
Expand Down
1 change: 1 addition & 0 deletions src/components/dashBoard/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ function Table() {
<div className=" font-bold text-lg mr-[15px]">Product List</div>
<button
type="button"
onClick={() => navigate(`/dashboard/addProduct/`)}
className="border-[2px] border-primary text-primary px-[5px] py-[5px] rounded-md flex justify-center items-center gap-2 text-sm
hover:shadow-lg hover:scale-105 transition-all duration-300 ease-in-out hover:bg-primary hover:text-white"
>
Expand Down
2 changes: 1 addition & 1 deletion src/features/Popular/bestSellingProductSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const fetchBestSellingProducts = createAsyncThunk<
>('bestSellingProducts/fetchBestSellingProducts', async (_, thunkAPI) => {
try {
const response = await axios.get(`${URL}/product/bestselling`);
return response.data; // Ensure this matches your API response structure
return response.data;
} catch (error: any) {
return thunkAPI.rejectWithValue(error.response?.data || error.message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function SignUp() {
type="submit"
disabled={isSubmitting || signUpState.loading}
aria-label="Submit Form"
className="w-full flex justify-center py-2 sm:py-4 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors"
className="w-full flex justify-center py-2 sm:py-4 bg-[#6d31ed] text-white rounded-md hover:bg-blue-[#6d31ed] transition-colors"
>
{isSubmitting || signUpState.loading ? (
<BeatLoader color="#ffffff" size={8} />
Expand Down
11 changes: 11 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ export default defineConfig({
globals: true,
environment: 'jsdom',
setupFiles: ['./src/__test__/setupTests.ts'],
coverage: {
exclude: [
'tailwind.config.js',
'.prettierrc.cjs',
'postcss.config.js',
'src/App.tsx',
'src/main.tsx',
'src/components/dashBoard/Admin.tsx',
'src/components/dashBoard/Table.tsx',
],
},
},
resolve: {
alias: {
Expand Down

0 comments on commit b7e9335

Please sign in to comment.