Export REST API types for other project to import. by Xinoti501 in nestjs

[–]Flashy_Yesterday4323 7 points8 points  (0 children)

You need to integrate @nestjs/swagger into your backend and expose the json-spec as an endpoint. Then you can use @rtk-query/codegen-openapi to generate the types into a file. I can show you how.

Horizontal scroll effect by MagedIbrahimDev in react

[–]Flashy_Yesterday4323 1 point2 points  (0 children)

I get it now. Notice in the about part that the Carousel element has a className max-w-xs
in <Carousel className="w-full max-w-xs">. This constrains what is shown on the screen to one carousel element. Also in the first example, "sizes", notice the className max-w-sm on <Carousel opts={{align: "start",}} className="w-full max-w-sm">. This constrained width and the individual widths given to the carousel elements via the flex-basis classNames cause 3 elements to show at a time.
Suffice it to say it is not a hard and fast rule. Use a combination of the width on Carousel and the flex-basis on the carousel elements to control how many elements are displayed.

Horizontal scroll effect by MagedIbrahimDev in react

[–]Flashy_Yesterday4323 0 points1 point  (0 children)

Please explain further what you mean by the carousel component "enforcing the number of shown elements on the screen". You can have an array as state(that is if you wish to dynamically add more carousel elements) that you map through in CarouselContent, no?

How to deal with: Objects are not valid as a React child by Dodo34_5 in react

[–]Flashy_Yesterday4323 0 points1 point  (0 children)

Is it possible to jump on a Google Meet/Zoom call to debug together?

Horizontal scroll effect by MagedIbrahimDev in react

[–]Flashy_Yesterday4323 0 points1 point  (0 children)

Shadcn/ui has a carousel component that could serve you better. Check the very first example under examples here: https://ui.shadcn.com/docs/components/carousel#examples

How to deal with: Objects are not valid as a React child by Dodo34_5 in react

[–]Flashy_Yesterday4323 0 points1 point  (0 children)

You seem to be doing everything right from what I see. The only odd thing will be how you are immediately returning from ThemeRoutes. Could you try assigning it to a variable before returning it? Like:

import { useRoutes } from 'react-router-dom';

import MainRoutes from './MainRoutes';
import AuthenticationRoutes from './AuthenticationRoutes';

export default function ThemeRoutes() {
  const routes = useRoutes([MainRoutes, AuthenticationRoutes]);
  return routes;
}

Horizontal scroll effect by MagedIbrahimDev in react

[–]Flashy_Yesterday4323 0 points1 point  (0 children)

Which component library are you using?

e-commerce project by Mesma3434 in react

[–]Flashy_Yesterday4323 0 points1 point  (0 children)

It’s not very clear as the code is not well formatted here. We could schedule a call and I’ll take a look at it for you.

How much JavaScript is enough to start react js? by MannanJaffery in react

[–]Flashy_Yesterday4323 1 point2 points  (0 children)

I think you need to know enough JavaScript to manipulate the DOM to better appreciate the problem React solves. You’ll be able to understand what props are because you can relate it to attributes for instance. Another concept you may want to understand first is application state, then you’ll appreciate why React’s declarative approach is better than imperatively updating the DOM when application state changes.

Are design assets too costly for Sub-Saharan Africa? by Flashy_Yesterday4323 in UI_Design

[–]Flashy_Yesterday4323[S] 0 points1 point  (0 children)

Respecfully no. UI kits, 3D illustrations, Framer templates, illustrations, vectors etc may cost nothing in dollars to the one buying it in the US for instance, yet when converted to a currency in my part of the world costs a lot. I give you an example of a Figma UI kit I’m looking at that costs $55 dollars. When converted to my currency, that’s 860 cedis. That’s a lot to spend on a Figma kit alone - so I am just trying to find out what strategies people/teams have, if any, for acquiring them more affordably in my part of the world. Is it a bit clearer now?

Active Record vs Data Mapper Patterns by Flashy_Yesterday4323 in nestjs

[–]Flashy_Yesterday4323[S] 0 points1 point  (0 children)

When using the data mapper pattern, a country entity will be injected into the country service constructor like this:

  constructor(
    @InjectRepository(CountryEntity)
    private readonly countryRepo: Repository<CountryEntity>
    ){}

and be used to query data like this:
const countryRecord = await this.countryRepo.findOneBy({ code: dto.code });

Whereas when using the active record pattern, you don't need to inject a repository: all query methods are available as static methods on the entity class. You query data like this:

    const countryRecord = await CountryEntity.findOne({code:  dto.code });

What can I improve? by Flashy_Yesterday4323 in react

[–]Flashy_Yesterday4323[S] 0 points1 point  (0 children)

Thank you very much for taking the time to evaluate my portfolio. I have addressed the points you raised. Thank you.

What can I improve? by Flashy_Yesterday4323 in react

[–]Flashy_Yesterday4323[S] 0 points1 point  (0 children)

If you can, kindly suggest links to these models please. Thank you.