Skip to content

Commit ef87c98

Browse files
authored
Merge pull request #252 from increments/replace-react-router-from-react-router-dom
Replace react-router from react-router-dom
2 parents dddf2b9 + a37e77a commit ef87c98

File tree

8 files changed

+8
-15
lines changed

8 files changed

+8
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"prettier": "^3.5.3",
4646
"react": "^18.3.1",
4747
"react-dom": "^18.2.0",
48-
"react-router-dom": "^7.4.1",
48+
"react-router": "^7.4.1",
4949
"ts-jest": "^29.3.1",
5050
"ts-loader": "^9.5.2",
5151
"typescript": "^5.7.2",

src/client/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { css } from "@emotion/react";
22
import { useState } from "react";
3-
import { useNavigate } from "react-router-dom";
3+
import { useNavigate } from "react-router";
44
import { apiItemsUpdatePath, itemsShowPath } from "../../lib/qiita-cli-url";
55
import { breakpoint, pointerFine } from "../lib/mixins";
66
import { Colors, Typography, Weight, getSpace } from "../lib/variables";

src/client/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Outlet, ScrollRestoration } from "react-router-dom";
1+
import { Outlet, ScrollRestoration } from "react-router";
22

33
export const Layout = () => {
44
return (

src/client/components/Router.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createBrowserRouter, RouterProvider } from "react-router-dom";
1+
import { createBrowserRouter, RouterProvider } from "react-router";
22
import { ItemsIndex } from "../pages/items";
33
import { ItemsShow } from "../pages/items/show";
44
import { Layout } from "./Layout";

src/client/components/SidebarArticles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { css } from "@emotion/react";
22
import { useState, useEffect } from "react";
33
import { MaterialSymbol } from "./MaterialSymbol";
4-
import { Link } from "react-router-dom";
4+
import { Link } from "react-router";
55
import { pointerFine } from "../lib/mixins";
66
import {
77
Colors,

src/client/components/SidebarContents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { css } from "@emotion/react";
22
import { useState } from "react";
3-
import { Link } from "react-router-dom";
3+
import { Link } from "react-router";
44
import { itemsIndexPath } from "../../lib/qiita-cli-url";
55
import { ItemsIndexViewModel } from "../../lib/view-models/items";
66
import { breakpoint, pointerFine, viewport } from "../lib/mixins";

src/client/pages/items/show.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { css } from "@emotion/react";
22
import { useState } from "react";
3-
import { useParams, useSearchParams } from "react-router-dom";
3+
import { useParams, useSearchParams } from "react-router";
44
import { apiItemsShowPath } from "../../../lib/qiita-cli-url";
55
import type { ItemsShowViewModel } from "../../../lib/view-models/items";
66
import { Article } from "../../components/Article";

yarn.lock

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5695,14 +5695,7 @@ react-is@^18.0.0:
56955695
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
56965696
integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==
56975697

5698-
react-router-dom@^7.4.1:
5699-
version "7.4.1"
5700-
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-7.4.1.tgz#fd913abb488364859c343881ecb7b7bc84b902f2"
5701-
integrity sha512-L3/4tig0Lvs6m6THK0HRV4eHUdpx0dlJasgCxXKnavwhh4tKYgpuZk75HRYNoRKDyDWi9QgzGXsQ1oQSBlWpAA==
5702-
dependencies:
5703-
react-router "7.4.1"
5704-
5705-
react-router@7.4.1:
5698+
react-router@^7.4.1:
57065699
version "7.4.1"
57075700
resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.4.1.tgz#0e6af1eefb8370d2cd79c961b87708afdb50fe64"
57085701
integrity sha512-Vmizn9ZNzxfh3cumddqv3kLOKvc7AskUT0dC1prTabhiEi0U4A33LmkDOJ79tXaeSqCqMBXBU/ySX88W85+EUg==

0 commit comments

Comments
 (0)