Commit graph

9 commits

Author SHA1 Message Date
Martin Maroši
0f89ced2a0 Change routing to consume chrome history context. 2023-01-12 15:41:26 +01:00
regexowl
ab1a7f4aab ESLint: Use --fix with updated rules to order imports
This applies the updated sorting rules to the files by running `npm run lint:js:fix`
2022-12-02 16:29:58 +01:00
lucasgarfield
a42a6a220f ShareImageModal: Add ShareImageModal to clone (share) AWS composes 2022-11-08 11:29:31 +01:00
Sanne Raymaekers
03421acc74 src/Router: use release as a basename in BrowserRouter
The insights platform is moving to react router v6, meaning router
contexts can no longer be nested. As a result all applications will end
up sharing the same `BrowserRouter`.

Switch to using the release (`/` or `/beta/`) as a basename for the
BrowserRouter, and offload the full path (`/insights/$appname`) to the
individual routes. This makes it easier to drop the BrowserRouter in
image builder for the platform one in future.
2022-10-17 15:53:21 +02:00
Jacob Kozol
4fa71cede8 update style across the project
The eslint updates require style changes in all components.
2022-05-23 12:47:20 +02:00
Sanne Raymaekers
6567323ef6 Router: Replace landing with catch-all route
This also mitigates the issue where clicking the image-builder nav link
would redirect you to `image-builder/image-builder` if image-builder was
already opened. And `/` didn't catch that path.
2021-11-30 16:12:43 +01:00
Jacob Kozol
50a515db1e Router: change Redirect to a Navigate
React router is moving away from redirects in favor of server side
redirecting since redirects are confusing because the initial "invalid"
route will still return a 200 status and redirecting unnecessarily
wastes resources. Instead of server routing we can also place our
Redirect inside of a Route as an element. Also, instead of using a
Redirect we use a Navigate. This is due to changes in how React Router
handles the history.
2021-11-18 19:06:56 +01:00
Jacob Kozol
81acb2bb57 Router: update Route components
In React Router v6 the Route paramater 'exact' is replaced by using a
trailing * to indicate the path matches deeply. Also, elements are now
preferred over components. React, itself, has also been making this
switch. Using elements is simpler than components and integrates
better with hooks.
2021-11-18 19:06:56 +01:00
Jacob Kozol
c6f2ed227f Router: change the Switch component to a Routes component
In React Router v6 the Switch element is replaced by Routes. All links
inside a <Routes> are relative and routes can be placed in any order
now.
2021-11-18 19:06:56 +01:00
Renamed from src/Routes.js (Browse further)