Specifying target in Dock/Menubar

UI Components for React
Post Reply
betterwithboxers
Posts: 1
Joined: 19 Nov 2021, 06:55

19 Nov 2021, 07:11

New to React and PrimeReact. Working in a class component with Typescript for a class project and I'm having trouble with routing links from the menubar and dock.

Two issues:

1-- the dock is taking up the whole screen, not showing over top the target screen. How do I get it adjusted so that the target shows in the main viewing area?

2--How can I get the url or target comment to recognize the Router? It's rendering a #/url after the existing address rather than replacing the endpoint as it should. I could adjust this pretty easily outside the menu model structure, but I'm not having much luck with it as is.

Heeeelllllppp?

Makistos
Posts: 1
Joined: 30 Nov 2021, 22:34

30 Nov 2021, 23:01

All I had to do in menubar was to add url to the item, e.g.

Code: Select all

const items = {
	label: 'Home',
	url: '/index'
}
If you have a similar solution already it must be something with your Router setup.

This is what my top-level routing looks. I'm also a noob and just started this app so not much to see:

Code: Select all

  <BrowserRouter>
    <Routes>
      <Route path="/" element={<App />}>
        <Route path="magazines" element={<Magazines />} />
        <Route path="magazines/:magazineId" element={<Magazine />} />
      </Route>
    </Routes>
  </BrowserRouter>,
  

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests