Skip to content

Commit

Permalink
Merge pull request #1719 from skaut/react-router-v7
Browse files Browse the repository at this point in the history
Updated to react-router v7
  • Loading branch information
marekdedic authored Jan 10, 2025
2 parents 9425946 + d757e3d commit 77f4c9a
Show file tree
Hide file tree
Showing 34 changed files with 2,631 additions and 2,994 deletions.
5,469 changes: 2,498 additions & 2,971 deletions packages/frontend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"react-dom": "^18.3.1",
"react-icons": "^5.4.0",
"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.3.0"
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
2 changes: 1 addition & 1 deletion packages/frontend/tests/App.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 * as swr from "swr";
import { beforeAll, describe, expect, test, vi } from "vitest";

Expand Down
Loading

0 comments on commit 77f4c9a

Please sign in to comment.