show an error message when handler is not found
This commit is contained in:
parent
f9d3018668
commit
9ef5a4931e
@ -29,7 +29,7 @@ import { createHashHistory } from "history";
|
|||||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||||
import { route, Route, Router } from "preact-router";
|
import { route, Route, Router } from "preact-router";
|
||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { CurrentAlerts } from "../components/CurrentAlerts.js";
|
import { AlertView, CurrentAlerts } from "../components/CurrentAlerts.js";
|
||||||
import { LogoHeader } from "../components/LogoHeader.js";
|
import { LogoHeader } from "../components/LogoHeader.js";
|
||||||
import PendingTransactions from "../components/PendingTransactions.js";
|
import PendingTransactions from "../components/PendingTransactions.js";
|
||||||
import {
|
import {
|
||||||
@ -299,7 +299,17 @@ export function Application(): VNode {
|
|||||||
component={({ uri }: { uri: string }) => {
|
component={({ uri }: { uri: string }) => {
|
||||||
const path = getPathnameForTalerURI(uri);
|
const path = getPathnameForTalerURI(uri);
|
||||||
if (!path) {
|
if (!path) {
|
||||||
return <Redirect to={Pages.balance} />;
|
return (
|
||||||
|
<CallToActionTemplate title={i18n.str`Taler URI handler`}>
|
||||||
|
<AlertView
|
||||||
|
alert={{
|
||||||
|
type: "warning",
|
||||||
|
message: i18n.str`Could not found a handler for the Taler URI`,
|
||||||
|
description: i18n.str`The uri read in the path parameter is not valid: "${uri}"`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</CallToActionTemplate>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return <Redirect to={path} />;
|
return <Redirect to={path} />;
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user