mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-09 09:14:31 +01:00
28 lines
754 B
TypeScript
28 lines
754 B
TypeScript
import { Button, InnerCard, NiceP, VStack } from "~/components";
|
|
import { useI18n } from "~/i18n/context";
|
|
import { useMegaStore } from "~/state/megaStore";
|
|
|
|
export function ResetRouter() {
|
|
const i18n = useI18n();
|
|
const [state, _] = useMegaStore();
|
|
|
|
async function reset() {
|
|
try {
|
|
await state.mutiny_wallet?.reset_router();
|
|
} catch (e) {
|
|
console.error(e);
|
|
}
|
|
}
|
|
|
|
return (
|
|
<InnerCard>
|
|
<VStack>
|
|
<NiceP>{i18n.t("error.reset_router.payments_failing")}</NiceP>
|
|
<Button intent="red" onClick={reset}>
|
|
{i18n.t("error.reset_router.reset_router")}
|
|
</Button>
|
|
</VStack>
|
|
</InnerCard>
|
|
);
|
|
}
|