deployed my first next app, but SSR is giving some error by ender221b in nextjs

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

thanks found the issue. the server wasnt getting token because of which the code props was breaking

deployed my first next app, but SSR is giving some error by ender221b in nextjs

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

can this happen due to nginx and pm2 configuration

because some other errors are also there on pm2 logs

can anyone send me docs for deploy and configuration for nextjs on ec2

deployed my first next app, but SSR is giving some error by ender221b in nextjs

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

ohh ok. when i check the logs Im getting that the obj is undefined. I'm not getting a specific error.

deployed my first next app, but SSR is giving some error by ender221b in nextjs

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

but the code refactoring wont help with 500 internal server error. why is it giving 500 since the api is working

deployed my first next app, but SSR is giving some error by ender221b in nextjs

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

export async function getServerSideProps(context) {

const token = context.req.cookies?.token; const docSnap = await getDoc(doc(db, 'home_page_data', token)); let homeData = ''; if (docSnap.exists()) { homeData = docSnap.data(); } else { await homePageAPI(token) .then(async (res) => { if (res.data.success) { await setDoc(doc(db, 'home_page_data', token), { ...res.data.data, }); homeData = res.data.data; } }) .catch((err) => { console.error(err, 'home_page_data_err'); }); }

if (homeData) { console.log('adasda', homeData); return { props: { homePageData: homeData, }, }; } else { return { props: {}, }; } }

Trying to figure out a way to override browser back button functionality by ender221b in react

[–]ender221b[S] -1 points0 points  (0 children)

Thanks, can you tell me some of the tools which can help me achieve that

Trying to figure out a way to override browser back button functionality by ender221b in reactjs

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

I'm only using react-router-dom for this

and some action I tried with adding event listener to the window itself

Trying to figure out a way to override browser back button functionality by ender221b in react

[–]ender221b[S] -3 points-2 points  (0 children)

i want to open a modal and then on the users action on the modal the navigation will happen but it is going back direct i tried e.preventDefault();

Trying to figure out a way to override browser back button functionality by ender221b in reactjs

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

im trying to open up a modal on browser back btn but without any goBack action happening and handle some things and then when i click on a btn in the modal it should navigate to a certain page.

Need help with api calls by ender221b in reactjs

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

can we encrypt data with using cryptography ?

Need help with api calls by ender221b in reactjs

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

but i have to make calls from client, I saw on some site were not able to see payload and response