diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-10 16:49:16 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-10 16:49:16 +0700 |
| commit | 62bebc1d33fd090d7666e18e7a0326ef7ef36897 (patch) | |
| tree | 1ec54e835b64adadc99ddc1ad3f23c1e63aaafcd /src | |
| parent | 8dea9e9242aca8bf003a7c2f69c96abafbf77e6d (diff) | |
fix
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/components/elements/Spinner/LogoSpinner.jsx | 15 | ||||
| -rw-r--r-- | src/lib/brand/components/Brands.jsx | 14 | ||||
| -rw-r--r-- | src/lib/product/components/Product/ProductDesktop.jsx | 4 | ||||
| -rw-r--r-- | src/pages/_app.jsx | 11 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/core/components/elements/Spinner/LogoSpinner.jsx b/src/core/components/elements/Spinner/LogoSpinner.jsx new file mode 100644 index 00000000..73b84e84 --- /dev/null +++ b/src/core/components/elements/Spinner/LogoSpinner.jsx @@ -0,0 +1,15 @@ +import Image from 'next/image' +import IndoteknikLogo from '@/images/LOGO-INDOTEKNIK-GEAR.png' + +const LogoSpinner = ({ ...props }) => ( + <Image + src={IndoteknikLogo} + alt='Indoteknik Logo' + width={64} + height={64} + className='page-loader' + {...props} + /> +) + +export default LogoSpinner diff --git a/src/lib/brand/components/Brands.jsx b/src/lib/brand/components/Brands.jsx index 25fb1c67..c7483e40 100644 --- a/src/lib/brand/components/Brands.jsx +++ b/src/lib/brand/components/Brands.jsx @@ -1,9 +1,7 @@ import odooApi from '@/core/api/odooApi' -import Spinner from '@/core/components/elements/Spinner/Spinner' -import DesktopView from '@/core/components/views/DesktopView' -import MobileView from '@/core/components/views/MobileView' import { useCallback, useEffect, useState } from 'react' import BrandCard from './BrandCard' +import LogoSpinner from '@/core/components/elements/Spinner/LogoSpinner' const Brands = () => { const alpha = Array.from(Array(26)).map((e, i) => i + 65) @@ -41,7 +39,7 @@ const Brands = () => { return ( <> <div className='container flex justify-center my-4'> - <Spinner className='w-6 text-gray_r-12/50 fill-gray_r-12 md:w-20 md:mt-28' /> + <LogoSpinner width={48} height={48} /> </div> </> ) @@ -68,13 +66,7 @@ const Brands = () => { <div className='grid grid-cols-4 gap-4 mt-4 md:grid-cols-7 !overflow-x-hidden'> {manufactures?.map( - (manufacture, index) => - manufacture.name && ( - <BrandCard - brand={manufacture} - key={index} - /> - ) + (manufacture, index) => manufacture.name && <BrandCard brand={manufacture} key={index} /> )} </div> </div> diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 751c0014..f926f171 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -170,7 +170,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { Lihat Varian </button> ) : ( - <td className='flex gap-x-3 mt-4'> + <div className='flex gap-x-3 mt-4'> <input type='number' className='form-input w-16 py-2 text-center bg-gray_r-1' @@ -191,7 +191,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { > Beli </button> - </td> + </div> )} <div className='flex mt-4'> diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx index 6906cb92..3c93d27f 100644 --- a/src/pages/_app.jsx +++ b/src/pages/_app.jsx @@ -6,8 +6,7 @@ import { Toaster } from 'react-hot-toast' import { QueryClient, QueryClientProvider } from 'react-query' import useDevice from '@/core/hooks/useDevice' import { useEffect, useState } from 'react' -import Image from 'next/image' -import IndoteknikLogo from '@/images/LOGO-INDOTEKNIK-GEAR.png' +import LogoSpinner from '@/core/components/elements/Spinner/LogoSpinner' const queryClient = new QueryClient() @@ -46,13 +45,7 @@ function MyApp({ Component, pageProps }) { <> {animateLoader && ( <div className='w-screen h-screen z-[500] flex justify-center items-center backdrop-blur'> - <Image - src={IndoteknikLogo} - alt='Indoteknik Logo' - width={64} - height={64} - className='page-loader' - /> + <LogoSpinner /> </div> )} <Toaster |
