0.0.8 • Published 24 days ago
@taitrd/commerce v0.0.8
Commerce Packages
Requirements
@taitrd/next@latest
- NextJs >= 12
- ReactJs
- React Hook Form
Content
Type definitions
Constants
Theme positions
export const THEME_POSITION = { NAVIGATION: 'nav__full-width', RES_NAVIGATION: 'res-nav__full-width', HOME_SLIDER: 'home-slider__full-width', HOME_SLIDER_SW7: 'home-slider__sw-70', HOME_STATIC_SW3: 'home-static__sw-30', FOOTER: 'footer__full-width', FOOTER_INNER_SW2: 'footer-inner__sw-20', NEWSLETTER: 'newsletter__full-width', PAGE_CONTENT: 'page-content__full-width', COPY_RIGHT: 'copyright__sw-50', }
Store APIs (public and private) integrate to Backend functions
Authentication
Using
authProps
function to capture user credentialsimport authProps from '@pages/_auth-props' export const getServerSideProps = authProps(async function (context: NextPageContext, user?: User) { return { props: { user, }, } })
Redirect to route
user/login
if not exists valid authentication.
Dealer
Store
Wishlist
Cart
Utils
Websocket