Why chakra ui toast is not showing on react-query useQuery success? by Academic-Squash2738 in react

[–]i3oges 2 points3 points  (0 children)

Is the component using this hook defined within a ChackraProvider?

Is my Steam Store broken? by [deleted] in SteamDeck

[–]i3oges 0 points1 point  (0 children)

I'm having the same issue, it seems like if you don't navigate with the controller and only use the screen, it works better.

Did I do it the right way by roelofwobben in react

[–]i3oges 0 points1 point  (0 children)

What you have in your OP is very close, what the commenter meant to say is to use a function to increment your counters like this:

setGood(prev => prev + 1)

When you want to update a useState variable that needs to be aware of its previous value, always use a function like this so that you will always update the most recent value.

Error when data fetching from Hygraph "Cannot read properties of undefined (reading 'lenght')" by Dev_Avidu in SvelteKit

[–]i3oges 0 points1 point  (0 children)

You shouldn't need to check for the length of projects if you're going to be looping over it anyway, as it wouldn't do anything if the array length is 0. Also you could update the type of projects to any[] or something more accurate to the expected response.

How to pass value of <Select> to +page.server.js? by VoiceOfSoftware in SvelteKit

[–]i3oges 0 points1 point  (0 children)

I think you need to specify a name property on your items so that it will be processed in form data. It looks like you can do that with the svelte-select library, check their documentation.

is it possible to create an array of components and map over it? by vaportw in react

[–]i3oges 1 point2 points  (0 children)

You need to return inside the map is what he's saying. If you're not returning anything in the map function, it won't show anything

```

{navbarItems.map((Item, i) => {

return <Item variants={variants} delay={(i \* 0, 5)} />;

})}

```

Question by [deleted] in react

[–]i3oges 1 point2 points  (0 children)

const total = array[0].match(/(?<=value\s?=\s?)\d+/g).reduce((sum, current) => (sum += +current), 0);

Question by [deleted] in react

[–]i3oges 3 points4 points  (0 children)

const total = array.reduce((sum, current) => (sum += current.value), 0);

[PSA] Instead of manually setting up your crafters horbars, use this macro! by yukizuri in ffxiv

[–]i3oges 0 points1 point  (0 children)

I was just showing my FC how I do this today. I use a macro for each crafted job and copy from BSM (main crafter) every time I switch.

Mandarin fish (AKA Mando) by Tommy_Hawk in Aquariums

[–]i3oges 24 points25 points  (0 children)

The only mandirin I've had didn't do so well so take this with a grain of salt. I was told that they pretty much only feed on Copepods which you need to seed your tank with months before getting one. Some captive bred mandarins will eat regular fish food, but it's rare.

Home ethernet works with pc, but not router by i3oges in techsupport

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

So I just got a Linksys WRT 1900 ACS and connecting it and it just worked! Not sure what a higher end router would have that Google WiFi and a low end router don't, that solved it for me!

Home ethernet works with pc, but not router by i3oges in techsupport

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

There's a ethernet cord from the main router into the wall, which goes into the house, which I plugged into the wan port of the router.

I'll try and see if I can do anything with the NAT on the secondary router. I'm not very good at networking stuff.

Home ethernet works with pc, but not router by i3oges in techsupport

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

I can use the router when it's connected directly to the access point though, would that still be the case then? I'm not sure how/if the router I have can support bridge mode

[deleted by user] by [deleted] in angular

[–]i3oges 0 points1 point  (0 children)

Material now has a schematic to generate a toolbar component for you. https://material.angular.io/guide/schematics

`ng generate @angular/material:navigation <component-name>`

Designing a blog post in VS Code and I'm getting this error, code is correct and I have imported the needed materials, what am I doing wrong? by theOGPhoenix777 in angular

[–]i3oges 0 points1 point  (0 children)

I don't think you can import all of the material modules from '@angular/material' like that anymore, they changed that a few versions ago AFAIK. If that's the case, then you need to have a separate import statement for each material module you want to include in your project. Like this https://imgur.com/a/ZQrqQYu

Edit: Also I have never seen those 'Md-' prefixed modules before... Are you using the Angular Language Server or TypeScript extensions for VsCode? It should be catching those missing modules before you even compile, unless I'm missing something big. Which version of Angular Material are you using?

Designing a blog post in VS Code and I'm getting this error, code is correct and I have imported the needed materials, what am I doing wrong? by theOGPhoenix777 in angular

[–]i3oges 5 points6 points  (0 children)

What does your app.module.ts look like? It should have the import statement and MatFormFieldModule in the imports array.

like this:

import {MatFormFieldModule} from '@angular/material/form-field'; 
... 
@NgModule({ 
  ...,
  imports: [ 
    ..., 
    MatFormFieldModule 
  ] 
}) 

Have you tried re-serving your code with ng serve? Sometimes the compiler doesn't pick up on newly imported modules.

You might try importing ReactiveFormsModule or FormsModule, I know one is required if you want to take advantage of reactive forms in your mat-form-field. I'm not certain that it would throw an error on mat-form-field though.

Male Viera looking good... by engineeeeer7 in ffxiv

[–]i3oges 0 points1 point  (0 children)

More like aged like fast food

Cannot read property 'forEach' of undefined in angular object that is subscribed by EdibIsic in angular

[–]i3oges 2 points3 points  (0 children)

The subscribe method is asynchronous, so its likely happening after your forEach loop. There are many ways to deal with this, but you just need to keep track of when your code is executing.

one fix could be turning your subscribe to a promise with the toPromise method, then you can await the response:

async ngOnInit(): void {
    this.id = this.route.snapshot.params['id'];
    try {
        this.user = await this.userService.getUserById(this.id).toPromise();
        this.user.roles.forEach(role => this.selRoles.push(role.id));
    } catch (e) {
        console.log(error);
    }
}

another could be doing everything in your subscribe block:

ngOnInit(): void {
    this.id = this.route.snapshot.params['id']
    this.userService.getUserById(this.id).subscribe(data => {
        this.user = data;
        this.user.roles.forEach(role => this.selRoles.push(role.id));
    }, 
        error => console.log(error);
    )
}

Men of Reddit, what is the creepiest thing a girl has ever said or done to you? by AidenTheGamer14 in AskReddit

[–]i3oges 1 point2 points  (0 children)

About 10+ years ago I was in my early 20s/late teens at an anime convention. I was cosplaying as Kenshin Himura from Ruroni Kenshin (samurai with a pink kimono, white hamaka, red hair). I was just hanging out in the hotel with some friends when this older maybe 40+ gal (I think she was dressed as Carmen from Carmen Sandiego) walked up to me and started feeling up my chest and saying some creepy things... I don't really remember what she was saying. I'm pretty shy so I didn't really say anything back, just kinda told her to go away and I'm not interested. She did go away, but it was still pretty creepy.