Skip to content

Commit 4026b98

Browse files
committed
fix url bugs
1 parent 5aebd34 commit 4026b98

7 files changed

Lines changed: 19 additions & 39 deletions

File tree

src/layouts/map/Routers.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default function Routers() {
7171
<Routes>
7272
<Route path="/metaverse" element={<Outlet />}>
7373
<Route
74-
path="sanad"
74+
path="Documents"
7575
element={
7676
<PrivateRoute>
7777
<Sanad />

src/layouts/menu/Profile.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ const Profile = () => {
183183
<Level isOpen={!isOpen}>{user?.level?.slug || 0}</Level>
184184
<Text isOpen={!isOpen}>{user?.code}</Text>
185185
</Btn>
186-
<BtnNavigator onClick={() => navigate("/metaverse/sanad")}>
186+
<BtnNavigator onClick={() => navigate("/metaverse/Documents")}>
187187
<Icon src={Ticket} />
188188
{getFieldTranslationByNames("241")}
189189
</BtnNavigator>

src/pages/Feature/Tabs/BuyFromSystem/BuyerContent.jsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/pages/Feature/Tabs/BuyFromSystem/BuyerTab.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import styled from "styled-components";
2-
import { useState } from "react";
3-
("../../../../../components/SidebarOptions");
4-
import BuyerContent from "./BuyerContent";
52
import SidebarOptions from "./SidebarOptions";
6-
3+
import SellerPrice from "./SellerPrice";
4+
import { Navigate,Route,Routes } from "react-router-dom";
75
const Wrapper = styled.div`
86
display: flex;
97
gap: 10px;
108
`;
119

1210
const BuyerTabSystem = () => {
13-
const [option, setOption] = useState(true);
1411
return (
1512
<Wrapper>
16-
<SidebarOptions option={option} setOption={setOption} />
17-
<BuyerContent option={option} />
13+
<SidebarOptions />
14+
<Routes>
15+
<Route index element={<Navigate to="price" replace />} />
16+
<Route path="price" element={<SellerPrice />} />
17+
</Routes>
1818
</Wrapper>
1919
);
2020
};

src/pages/Feature/Tabs/BuyFromSystem/SidebarOptions.jsx

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import styled from "styled-components";
22
import { getFieldTranslationByNames } from "../../../../services/Utility";
3-
3+
import { Label } from "../../../../components/sidbar";
4+
import { NavLink } from "react-router-dom";
45
const Wrapper = styled.div`
56
max-width: 171px !important;
67
background-color: ${(props) =>
@@ -10,29 +11,15 @@ const Wrapper = styled.div`
1011
margin-top: 20px;
1112
`;
1213

13-
const Option = styled.h2`
14-
font-weight: 500;
15-
font-size: 18px;
16-
padding: 10px 20px;
17-
white-space: nowrap;
18-
cursor: pointer;
19-
color: ${(props) =>
20-
props.option
21-
? props.theme.colors.primary
22-
: props.theme.colors.newColors.shades.title};
23-
border-right: ${(props) =>
24-
props.option
25-
? `2px solid ${(props) =>
26-
props.theme.colors.newColors.otherColors.inputBorder}`
27-
: "2px solid transparent"};
28-
`;
29-
30-
const SidebarOptions = ({ option, setOption }) => {
14+
const SidebarOptions = () => {
3115
return (
3216
<Wrapper>
33-
<Option option={option === true} onClick={() => setOption(true)}>
17+
<NavLink to="price" replace end>
18+
{({isActive})=>( <Label menu={isActive}>
3419
{getFieldTranslationByNames("524")}
35-
</Option>
20+
</Label>)}
21+
</NavLink>
22+
3623
</Wrapper>
3724
);
3825
};

src/pages/Search/Tabs/citizen-tab/Buttons.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const Buttons = ({ user }) => {
8484
icon: <MdOutlineMailOutline />,
8585
label: getFieldTranslationByNames("469"),
8686
onClick: () =>
87-
Navigate("/metaverse/sanad", {
87+
Navigate("/metaverse/Documents", {
8888
state: { code: user?.code, user: user?.id },
8989
}),
9090
},

src/services/TitleManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const isId = (seg) => /^\d+$/.test(seg);
99
const isDynamicSegment = (seg) => /^packet-/.test(seg);
1010

1111
const pageTranslations = {
12-
sanad: "1315",
12+
Documents: "1315",
1313
profile: "243",
1414
settings: "642",
1515
store: "30",

0 commit comments

Comments
 (0)