Questions tagged [app-router]

116 questions
0
votes
2 answers

Why does my| useRouter function have no effect?

I'm trying to build an App using nextjs 13 and the new App router feature (https://nextjs.org/blog/next-13-4) : My problem is about navigation, I'm following the documentation but nothing happened First of all, here's a minimal component : "use…
Ninhache
  • 26
  • 3
0
votes
0 answers

NEXTJS13.4.4 - Cannot find draggable entry with id [1] & data-rbd-draggable-context-id` didnot match. Server: "1"Client: "0"' with react-beautiful-dnd

How can I fix an issue in Next.js? "use client" import React, { useState, useEffect } from "react" import { useFinalDataFromForm } from "@/store/useEventAddingData" import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd" import {…
0
votes
0 answers

Vercel: NextJS app reloads when navigating to ‘/‘

I have this NextJS app deployed on vercel I'm using the new app directory and make use of the RSC components. The error presenting in this app is that navigation towards the home route / causes the app to reload. This doesn't happen when navigating…
Fer Toasted
  • 1,274
  • 1
  • 11
  • 27
0
votes
0 answers

Set Cookies on client from server side query (NextJS)

I have a problem with set client cookies when I do request from server side NextJS 13.4 I want to do request to backend on server side component and set cookies that were returned from backend. When I use client side component and do request from…
0
votes
3 answers

How to change title on page using a client component with app router in Next.js?

I'm building a blog using Next.js and I'm utilizing the new app router for navigation. However, I'm encountering an issue where every blog page displays the same title and description. Upon investigating the code, I found that the title and…
0
votes
0 answers

UI not updating with new state from context - Next 13 app router

I'm working on an e-commerce site with new Next 13 app route in that I am using react context and State Provider for managing state in the app. I want to that cart items persist even after refresh and data comes from local storage (for non-auth…
0
votes
1 answer

Nextjs build output still showing Pages Router after migration to App Router

I've recently migrated all the routes on my project from pages router to app router. I no longer have a pages folder. The build output is still showing the pages router, 404 route. Build output Route (pages) Size …
0
votes
1 answer

What's the correct way to use structured data jsonLD in Next.js 13 app-router?

I was trying to add structured data in my nextJS 13(app router) application but couldn't find the correct method. Next-seo package also gives errors I tried next-seo but got this error: Unhandled Runtime Error Error: Cannot read properties of null…
Warrior
  • 23
  • 4
0
votes
1 answer

pass parameter inside generateStaticParams function for SSG NextJS

for my SSG page I need to pass a parameter which is language to my api call function which is inside generateStaticParams function, I have stored language inside cookies and I can not access that, is there a way I can pass params to my…
EshgheCode
  • 288
  • 4
  • 19
0
votes
2 answers

app router next js avoid the default layout and use our own page layout?

I used a default layout in layout.jsx and as props, I passed all my other pages as children, in page router, we could config router path to define which layout should be used but in this new system, I don't know how to code it. import…
0
votes
0 answers

Next.js App Router layout - how to incorporate script files?

I am switching from next.js Pages Router to the new App Router. Trying to figure out how to include flowbite script files in layouts - don't really need them at root. Previously I included them in the _document.js like so: …
codenext
  • 1
  • 2
0
votes
1 answer

How to change the app route path if a page (walkthrough) has been view once

I have app walkthrough / intro built using ion-slides which is loaded as the default page in app.routing.module.ts . { path: '', redirectTo: 'walkthrough', pathMatch: 'full' },{ path: 'walkthrough', loadChildren: () =>…
dancingbush
  • 2,131
  • 5
  • 30
  • 66
0
votes
2 answers

Capture Session Timeout in SAP cloud foundry application

Iam developing a SAP CF app and wnated to capture session timeout and show pop-up to user before session timeout happs to either refresh the session or execute the logout ,but setting the env variable SESSION_TIMEOUT as given in the link is also…
SCD
  • 89
  • 2
  • 10
0
votes
1 answer

Is there a way to validate oauth token sent by approuter in plain java application ( micro service in cloud foundry ) without using spring

I have an approuter written in node.js which sends a jwt token to the java application after user authentication. I need to verify this token and scope in spring application before executing the REST API, but is there a way to do the same thing…
Pradeep
  • 350
  • 1
  • 3
  • 13
0
votes
0 answers

Need help on app-route element of polymer implemented in .net core mvc application

I'm implementing polymer's app-route element in .net core mvc application. The folder structure is : -project --wwwroot folder ---bower_components ---Components ----page1 folder -page1.html ----page2…