Skip to content

Commit

Permalink
Updated to react-router v7
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Nov 25, 2024
1 parent abf5907 commit f65713a
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 40 deletions.
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

0 comments on commit f65713a

Please sign in to comment.