Skip to content

Commit

Permalink
feat(ui): update notification route
Browse files Browse the repository at this point in the history
  • Loading branch information
Vu Van Duc authored and Vu Van Duc committed Jul 16, 2024
1 parent bf20971 commit 43cb955
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
22 changes: 15 additions & 7 deletions src/locales/en/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -963,16 +963,24 @@
"accept": "Accept",
"decline": "Decline",
"cancel": "Cancel",
"choosecredential": "Choose credential"
"back": "Back",
"choosecredential": "Choose credential",
"providecredential": "Provide credential"
},
"credential": {
"request": {
"title": "Credential request",
"requestfrom": "Request from",
"requestedcredential": "Requested credential",
"informationrequired": "Information required",
"alert": {
"textdecline": "Are you sure you want to decline this credential request? You won't be able to change your decision later."
"information": {
"title": "Credential request",
"requestfrom": "Request from",
"requestedcredential": "Requested credential",
"informationrequired": "Information required",
"alert": {
"textdecline": "Are you sure you want to decline this credential request? You won't be able to change your decision later."
}
},
"choosecredential": {
"description": "Select the most appropriate {{requestCred}} to provide the required information",
"title": "Choose credential"
}
},
"receive": {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/backRoute/backRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const backRoute: Record<string, any> = {
[RoutePath.CONNECTION_DETAILS]: {
updateRedux: [removeCurrentRoute],
},
[RoutePath.NOTIFICATION_DETAILS]: {
[TabsRoutePath.NOTIFICATION_DETAILS]: {
updateRedux: [removeCurrentRoute],
},
[TabsRoutePath.IDENTIFIER_DETAILS]: {
Expand Down
13 changes: 6 additions & 7 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Routes = () => {

useEffect(() => {
if (!routes.length) dispatch(setCurrentRoute({ path: nextPath.pathname }));
}, [routes, nextPath.pathname]);
}, [routes, nextPath.pathname, dispatch]);

return (
<IonReactRouter>
Expand Down Expand Up @@ -85,12 +85,6 @@ const Routes = () => {
component={ConnectionDetails}
exact
/>
<Route
path={RoutePath.NOTIFICATION_DETAILS}
component={NotificationDetails}
exact
/>

{tabsRoutes.map((tab, index: number) => {
return (
<Route
Expand All @@ -116,6 +110,11 @@ const Routes = () => {
component={CredentialDetails}
exact
/>
<Route
path={TabsRoutePath.NOTIFICATION_DETAILS}
component={NotificationDetails}
exact
/>
<Redirect
exact
from="/"
Expand Down
4 changes: 2 additions & 2 deletions src/routes/nextRoute/nextRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const getNextCredentialDetailsRoute = () => {
};

const getNextNotificationsRoute = () => {
const path = RoutePath.NOTIFICATION_DETAILS;
const path = TabsRoutePath.NOTIFICATION_DETAILS;
return { pathname: path };
};

Expand Down Expand Up @@ -255,7 +255,7 @@ const nextRoute: Record<string, any> = {
nextPath: () => getNextNotificationsRoute(),
updateRedux: [],
},
[RoutePath.NOTIFICATION_DETAILS]: {
[TabsRoutePath.NOTIFICATION_DETAILS]: {
nextPath: () => getNextNotificationDetailsRoute(),
updateRedux: [],
},
Expand Down
2 changes: 1 addition & 1 deletion src/routes/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ enum RoutePath {
CREATE_PASSWORD = "/createpassword",
SSI_AGENT = "/ssiagent",
CONNECTION_DETAILS = "/connectiondetails",
NOTIFICATION_DETAILS = "/notificationdetails",
VERIFY_RECOVERY_SEED_PHRASE = "/verifyrecoveryseedphrase",
}

Expand All @@ -21,6 +20,7 @@ enum TabsRoutePath {
MENU = "/tabs/menu",
IDENTIFIER_DETAILS = "/tabs/identifiers/:id",
CREDENTIAL_DETAILS = "/tabs/credentials/:id",
NOTIFICATION_DETAILS = "/tabs/notifications/:id",
}

const PublicRoutes = [
Expand Down

0 comments on commit 43cb955

Please sign in to comment.