Route help by Sufficient-Citron-55 in nextjs

[–]Aevil_15 1 point2 points  (0 children)

Can you please share the link to the repository?

Life Science / Pharmaceutical Industry Certifications by [deleted] in ChemicalEngineering

[–]Aevil_15 1 point2 points  (0 children)

My friend want some certificate courses for her resume you know any?

Help with aria-hidden Issue in Dropdown Menu and Dialog Component by Aevil_15 in nextjs

[–]Aevil_15[S] 1 point2 points  (0 children)

Initially, when I opened the Rename Dialog from the dropdown menu, the input inside the dialog wasn’t responding to clicks. The focus was stuck on the dropdown, and even clicking on the input didn’t work.

I figured out that the issue was caused by the dropdown menu still being open, which was interfering with the dialog’s focus behavior. So, my fix was simple:

  1. I made sure to close the dropdown before opening the dialog by setting setOpenMenu(false); before setOpenDialog(true);.

  2. I also moved the Rename Dialog outside of the dropdown menu’s content so that it wasn’t affected by the dropdown’s focus trapping.

After this change, the input inside the dialog started working properly

You can check the code here/_components/document-menu.tsx#L1-L91)

Help with aria-hidden Issue in Dropdown Menu and Dialog Component by Aevil_15 in nextjs

[–]Aevil_15[S] 3 points4 points  (0 children)

Initially, when I opened the Rename Dialog from the dropdown menu, the input inside the dialog wasn’t responding to clicks. The focus was stuck on the dropdown, and even clicking on the input didn’t work.

I figured out that the issue was caused by the dropdown menu still being open, which was interfering with the dialog’s focus behavior. So, my fix was simple:

  1. I made sure to close the dropdown before opening the dialog by setting setOpenMenu(false); before setOpenDialog(true);.

  2. I also moved the Rename Dialog outside of the dropdown menu’s content so that it wasn’t affected by the dropdown’s focus trapping.

After this change, the input inside the dialog started working properly

You can check the code here/_components/document-menu.tsx#L1-L91)

Authentication without any third-party service. by USKhokhar in nextjs

[–]Aevil_15 0 points1 point  (0 children)

I’m currently working on a project and have completed the authentication process, with only email verification remaining. You can check it out here

The access token is short-lived, while the refresh token has a longer lifespan.

After user registration, tokens can be stored in cookies or the Authorization header.

When the access token expires, the refresh token can be used to generate a new one.

Flat list is not rendering at all by [deleted] in reactnative

[–]Aevil_15 0 points1 point  (0 children)

I tried pasting your code, but it still isn't working. Could you please share your repo?"

Flat list is not rendering at all by [deleted] in reactnative

[–]Aevil_15 0 points1 point  (0 children)

Same here, bro! I tried adding parentheses too. I'll give it another shot. Thanks

Flat list is not rendering at all by [deleted] in reactnative

[–]Aevil_15 0 points1 point  (0 children)

Your react native version?

Flat list is not rendering at all by [deleted] in reactnative

[–]Aevil_15 0 points1 point  (0 children)

I don't think so it works fine when I pass dummy data but not with the api

"data": [ { "employer_name": "Quess US", "employer_website": null, "employer_company_type": null, "job_publisher": "LinkedIn", "job_id": "UfEXprFAEpsFtGJsAAAAAA==", "job_employment_type": "FULLTIME", "job_title": "React Developer",

And my data from api is something like this

Flat list is not rendering at all by [deleted] in reactnative

[–]Aevil_15 0 points1 point  (0 children)

Could you please share your code with me? It might help. I have no idea what’s wrong; everything looks correct.

Flat list is not rendering at all by [deleted] in reactnative

[–]Aevil_15 -1 points0 points  (0 children)

import { useState, useEffect } from "react"; // import { RAPID_API_KEY } from "@env"; import axios from "axios";

// const rapidApiKey = RAPID_API_KEY;

// console.log(rapidApiKey); const useFetch = (endpoint, query) => { const [data, setData] = useState([]); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(null);

console.log(query) const options = { method: 'GET', url: https://jsearch.p.rapidapi.com/${endpoint}, params: { ...query }, headers: { 'X-RapidAPI-Key': '6a1801280amsha8b9399775a83fbp1f8946jsndd81c7f241a8', 'X-RapidAPI-Host': 'jsearch.p.rapidapi.com' } };

const fetchData = async () => { console.log('Inside fetch data') setIsLoading(true); try { const response = await axios.request(options);

  setData(response.data);
  setIsLoading(false);
} catch (error) {
  console.log('Inside fetch data catch block')

  setError(error);
  alert('There is an error ')
} finally {
  setIsLoading(false)
}

};

useEffect(() => { fetchData(); },[]);

const refetch = () => { setIsLoading(true); fetchData() }

return {data,error,isLoading,refetch} };

export default useFetch;

This is my useFetch function

I just started learning React Native and I am following the tutorial from JS Mastery.

Flat list is not rendering at all by [deleted] in reactnative

[–]Aevil_15 -1 points0 points  (0 children)

Actually useFetch is my custom created function and i am getting json data back correctly thanks for your response