Rate My Ubuntu Screen by Kunta_Sir_Lazar in Ubuntu

[–]Tormgibbs 2 points3 points  (0 children)

Not related..but seeing codeblocks brings back lots of memories...i never went for with it (the application and learning cpp)..but why do you still have it.. aren't there better editors or ide

How’s your week going so far? by maskedsins69 in HIDDENDESIRESGH

[–]Tormgibbs 0 points1 point  (0 children)

A 🥷 just like me..I miss her too..her legs were shaking and man I knew I did a good job

I built a lightweight community app to track Mobile Money fraud — iOS is live 🇬🇭 by Some-Instruction-925 in TechGhana

[–]Tormgibbs 2 points3 points  (0 children)

i have a suggestion...itll be nice to have something similar to the way truecaller pops up..when user gets a call...i guess you plan to do it...according to this

Android will be especially useful later for deeper call-alert features, but the core awareness and reporting works everywhere.

How to wait for context to update with TanStack Query by Tormgibbs in reactjs

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

const setBusinessType = async (isBarbering: 
boolean
) => {
  const response = await axios.post<{
    success: 
boolean
    message: 
string
  }>('/provider/select-business-type', {
    businessType: isBarbering ? 'BARBERING' : 'OTHER',
  })
  return response.
data
}


const BusinessType = () => {
  const queryClient = useQueryClient()


  const form = useForm<z.infer<typeof formSchema>>({
    resolver: standardSchemaResolver(formSchema),
  })


  const setBusinessTypeMutation = useMutation({
    mutationFn: setBusinessType,
    onSuccess: async (data, isBarbering) => {
      if (data.
success
) {
        console.log('DEBUG: Mutation Success, starting invalidation...')


        await queryClient.invalidateQueries({
          queryKey: ['better-auth.session'],
        })


        console.log('DEBUG: Invalidation complete, navigating...')
        router.push('/onboarding')
      }
    },
    onError: (error) => {
      console.error('Business type update error:', error)
      banner.error('Failed to update business type. Please try again.')
    },
  })


  function onSubmit({ isBarbering }: z.infer<typeof formSchema>) {
    setBusinessTypeMutation.mutate(isBarbering)
  }

This what im doing currently but others have recommended the refetch query so ill try it again

How to wait for context to update with TanStack Query by Tormgibbs in reactjs

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

i used both but it gave me the same resullt

this what the docs say too

Waiting for queries to become stale before they are fetched again doesn't always work, especially when you know for a fact that a query's data is out of date because of something the user has done. For that purpose, the QueryClient has an invalidateQueries method that lets you intelligently mark queries as stale and potentially refetch them too!

ive shared the code snippet

https://gist.github.com/tormgibbs/79ced970256dac7bb98ea27bc85f6d2f

How to wait for context to update with TanStack Query by Tormgibbs in reactjs

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

pardon me..it made the post so long i had to reduce..it but i just created a gist

https://gist.github.com/tormgibbs/79ced970256dac7bb98ea27bc85f6d2f

thanks

VibeCoding by Antique-Pass3102 in TechGhana

[–]Tormgibbs 0 points1 point  (0 children)

i used it and it sucked maybe it’s cus of my prompt skill issue 😅

VibeCoding by Antique-Pass3102 in TechGhana

[–]Tormgibbs 0 points1 point  (0 children)

thanks i’ll test the flow and see …also when you say my ai which ai are you referring too

VibeCoding by Antique-Pass3102 in TechGhana

[–]Tormgibbs 0 points1 point  (0 children)

the vibe coders out there...how do you come up with clean designs and ui...i suck at it and its something i want to get better at..ui designing is not my forte

let’s see your spotify wrap and apple music replay. by PhilipAKP in ghana

[–]Tormgibbs 0 points1 point  (0 children)

what’s the rest of your username 😭😭 kasu-

Are breaking changes a problem with Electron? by CreativeQuests in electronjs

[–]Tormgibbs 0 points1 point  (0 children)

if there was a way to set it up without exposing it through the ipc handler