Quiz, background condition doesnt work, using bootstrap

I have quiz app. If user click on answer, I am trying to add green background, if user selected correct answer. Green background is working, but if user selected wrong answer ,I want to add red background , and here is problem , some reason , red background doesn’t work , can you please tell… Read More Quiz, background condition doesnt work, using bootstrap

Nextjs13 Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead

I’m learning nextjs using book "Building React Apps using server-side rendering" In this I’m building basic react app with index page link to about page. The project package.json – { "name": "my-next-app", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "next", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license":… Read More Nextjs13 Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead

How to migrate from redux to react-query?

I started studying react-query, I can’t figure it out. Please help with an example based on my code There was such an action and a reducer export const addHighlighting = parent_id => dispatch => { dispatch({ type: types.HANDLE_COMMENT_HIGHLIGHTING, payload: { parent_id, is_highlighted: true } }) } case types.HANDLE_COMMENT_HIGHLIGHTING: const parentIndex = state.comments.findIndex( comment => comment.id… Read More How to migrate from redux to react-query?

How to build relevant auto generating tags recommendation model in python

How to Build a Relevant Auto Generating Tags Recommendation Model in Python One of the most important features of any blog or website is its ability to recommend relevant tags to users. This not only helps users find related content easily, but it also improves the overall user experience. In this blog post, we’ll show… Read More How to build relevant auto generating tags recommendation model in python

How do I go to an external link when I click on a button in next js

<button type="button" className = {styles.googleButton}> <img className = {styles.image} src = "assets/pictures/google.jpg"></img> <p className = {styles.buttonText}> Go To Google</p> <img src = "assets\icons\external-link.svg"></img> </button> when i click on this button how do i go to google.com on A DIFFERENT TAB? >Solution : Add an ‘a’ tag and set its target value to ‘_blank’. Also add… Read More How do I go to an external link when I click on a button in next js

error when moving to another page next js

I’m receiving this error when moving to another page in next js 1 of 3 unhandled errors Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading ‘pagenum’) Source pages\dpt[dptid]\rewayat[rewid][subrewid]\surah[surahid]\p[pid].js (89:36) @ Page 87 | imag = /image/${dptid}/${rewid}/${subrewid}/${surahid}/${pid}.png; 88 | 89 | pagenum = surahs[surah${surahid}].pagenum; | ^ 90 | console.log(pagenum); 91 | page = surahs[surah${surahid}].page;… Read More error when moving to another page next js

how to destructure property if possibly undefined?

I’m getting stuck on this TS error created at build time. Does anyone has any suggestions? TypeError: Cannot destructure property ‘site’ of ‘(intermediate value)’ as it is undefined. export default function Project({ data, preview, }: { data: any preview: any }) { const { site, page } = data?.post return ( <Layout site={site} page={page}> //… Read More how to destructure property if possibly undefined?