Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
El servidor es console.logging indefinido para mi router.query.collection, el cliente está registrando la consulta

No estoy seguro de por qué recibo información diferente en el cliente que en el servidor. Estoy usando Next.js y estoy tratando de usar la consulta de URL pero recibo undefined en el servidor.

[collection].js

 import { useRouter } from "next/router"; import React from 'react' import axios from "axios" import {withRouter} from 'next/router'; function collection({symbol,image,title}) { const router = useRouter() var collections = router.query.collection console.log(collections) const url = `api-mainnet.magiceden.dev/v2/collections/${collections}/stats` console.log(url) axios.get(url).then((data)=>console.log(data)) return ( <div></div> ) } export default collection

Nft.jsx

 import React from 'react' import Link from 'next/link' const Nft = ({image,title,collection,symbol}) => { return ( <div> <div> <Link href={`/collections/${symbol}`} ><a>{title}</a></Link> <div className='Card'> <img className='nftImage' src={image}/> <h5>{collection}</h5> </div> </div> </div> ) } export default Nft

Lo que estoy consola.Iniciando sesión en el servidor

 undefined undefined

Lo que estoy consola. Iniciar sesión en el cliente

 undefined gigahub
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!