Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to react-router v7 #1719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render } from "@testing-library/react";
import { mocked } from "jest-mock";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";
import * as swr from "swr";

import { App } from "../src/App";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { AppNavigation } from "../../src/components/AppNavigation";

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/components/Issue.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { Issue } from "../../src/components/Issue";
import { getIssueWithProject } from "../../src/utils/getIssueWithProject";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/components/IssuesList.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { IssuesList } from "../../src/components/IssuesList";
import { testData } from "../testData";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/components/Navigation.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { Navigation } from "../../src/components/Navigation";

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/components/Project.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { Project } from "../../src/components/Project";
import { testData } from "../testData";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { ProjectLinks } from "../../src/components/ProjectLinks";
import { testData } from "../testData";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { Link, MemoryRouter, Route, Routes } from "react-router-dom";
import { Link, MemoryRouter, Route, Routes } from "react-router";

import { ScrollToTop } from "../../src/components/ScrollToTop";

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/pages/IssueDetail.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter, Route, Routes } from "react-router-dom";
import { MemoryRouter, Route, Routes } from "react-router";

import { IssueDetail } from "../../src/pages/IssueDetail";
import { testData } from "../testData";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/pages/IssuesList.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { IssuesList } from "../../src/pages/IssuesList";
import { testData } from "../testData";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/pages/ProjectDetail.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter, Route, Routes } from "react-router-dom";
import { MemoryRouter, Route, Routes } from "react-router";

import { ProjectDetail } from "../../src/pages/ProjectDetail";
import { testData } from "../testData";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/__tests__/pages/ProjectsList.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render } from "@testing-library/react";
import { MemoryRouter } from "react-router-dom";
import { MemoryRouter } from "react-router";

import { ProjectsList } from "../../src/pages/ProjectsList";
import { testData } from "../testData";
Expand Down
73 changes: 43 additions & 30 deletions packages/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.28.0",
"react-router": "^7.0.1",
"remark-gfm": "^4.0.0",
"string-to-color": "^2.2.2",
"swr": "^2.2.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsxImportSource @emotion/react */
import type React from "react";

import { Route, Routes } from "react-router-dom";
import { Route, Routes } from "react-router";
import useSWR from "swr";

import type { ProjectListings } from "./interfaces/ProjectListings";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/ArticleBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type React from "react";

import styled from "@emotion/styled";
import ReactMarkdown from "react-markdown";
import { Link } from "react-router-dom";
import { Link } from "react-router";
import remarkGfm from "remark-gfm";

import { ColoredTag } from "./ColoredTag";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type React from "react";

import { Global } from "@emotion/react";
import styled from "@emotion/styled";
import { Link, Outlet } from "react-router-dom";
import { Link, Outlet } from "react-router";

import { globalStyles } from "../globalStyles";
import logo from "../images/logo.svg";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/IssuesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type React from "react";

import { css } from "@emotion/react";
import ReactMarkdown from "react-markdown";
import { Link } from "react-router-dom";
import { Link } from "react-router";
import remarkGfm from "remark-gfm";

import type { Project } from "../interfaces/Project";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type React from "react";

import styled from "@emotion/styled";
import { NavLink } from "react-router-dom";
import { NavLink } from "react-router";

import { theme } from "../theme";

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/ScrollToTop.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from "react";
import { useLocation } from "react-router-dom";
import { useLocation } from "react-router";

export const ScrollToTop = (): null => {
const location = useLocation();
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { createRoot } from "react-dom/client";
import { BrowserRouter as Router } from "react-router-dom";
import { BrowserRouter as Router } from "react-router";

import { App } from "./App";

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/IssueDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type React from "react";
import { css } from "@emotion/react";
import { AiFillGithub } from "react-icons/ai";
import ReactMarkdown from "react-markdown";
import { Link, useParams } from "react-router-dom";
import { Link, useParams } from "react-router";
import remarkGfm from "remark-gfm";

import type { ProjectListings } from "../interfaces/ProjectListings";
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/ProjectDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type React from "react";

import { css } from "@emotion/react";
import ReactMarkdown from "react-markdown";
import { useParams } from "react-router-dom";
import { useParams } from "react-router";
import remarkGfm from "remark-gfm";

import type { ProjectListings } from "../interfaces/ProjectListings";
Expand Down
Loading