Skip to content

Commit

Permalink
chore: remove react-router
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Dec 12, 2023
1 parent 9cda25a commit fa61aaf
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 143 deletions.
3 changes: 1 addition & 2 deletions AccountCenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"@ant-design/icons": "^4.0.0",
"classnames": "^2.2.6",
"moment": "^2.24.0",
"numeral": "^2.0.6",
"react-router": "^4.3.1"
"numeral": "^2.0.6"
},
"peerDependencies": {
"@ant-design/pro-components":"^2.6.43"
Expand Down
4 changes: 1 addition & 3 deletions AccountCenter/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Avatar, Card, Col, Divider, Input, Row, Tag, InputRef } from 'antd';
import React, { useState, useRef } from 'react';
import { GridContent } from '@ant-design/pro-components';
import { Link, useRequest } from '@umijs/max';
// @ts-ignore
import type { RouteChildrenProps } from 'react-router';
import Projects from './components/Projects';
import Articles from './components/Articles';
import Applications from './components/Applications';
Expand Down Expand Up @@ -96,7 +94,7 @@ const TagList: React.FC<{ tags: CurrentUser['tags'] }> = ({ tags }) => {
);
};

const PAGE_NAME_UPPER_CAMEL_CASE: React.FC<RouteChildrenProps> = () => {
const PAGE_NAME_UPPER_CAMEL_CASE: React.FC = () => {
const { styles } = useStyles();
const [tabKey, setTabKey] = useState<tabKeyType>('articles');

Expand Down
6 changes: 1 addition & 5 deletions UserRegisterResult/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
"dev": "umi dev"
},
"dependencies": {
"classnames": "^2.2.6",
"react-router": "^4.3.1"
},
"devDependencies": {
"@types/react-router": "^5.0.2"
"classnames": "^2.2.6"
},
"blockConfig": {
"specVersion": "0.1"
Expand Down
3 changes: 1 addition & 2 deletions UserRegisterResult/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Button, Result } from 'antd';
import { Link, useLocation } from '@umijs/max';
import React from 'react';
import type { RouteChildrenProps } from 'react-router';
import useStyles from './style.style';

export type LocationState = Record<string, unknown>;

const PAGE_NAME_UPPER_CAMEL_CASE: React.FC<RouteChildrenProps> = () => {
const PAGE_NAME_UPPER_CAMEL_CASE: React.FC = () => {
const { styles } = useStyles();
const location = useLocation();
const actions = (
Expand Down
Loading

0 comments on commit fa61aaf

Please sign in to comment.