diff options
author | Sebastian <sebasjm@gmail.com> | 2023-01-23 11:25:53 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-01-23 11:25:53 -0300 |
commit | 86e1cb5b06c4b5e2080a18fce6dca2fb00b09f14 (patch) | |
tree | 4a81e98aa00b4a6f7386d897ed3f20d78555d6b2 /packages/merchant-backend-ui/src | |
parent | d195a9ddc85c52cf214984ebf63dc0e03f016c90 (diff) | |
download | wallet-core-86e1cb5b06c4b5e2080a18fce6dca2fb00b09f14.tar.xz |
fix deleted tip name and format name as merchant backend expected
Diffstat (limited to 'packages/merchant-backend-ui/src')
-rw-r--r-- | packages/merchant-backend-ui/src/index.tsx | 44 | ||||
-rw-r--r-- | packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx | 30 | ||||
-rw-r--r-- | packages/merchant-backend-ui/src/pages/DeletedTip.tsx | 6 |
3 files changed, 35 insertions, 45 deletions
diff --git a/packages/merchant-backend-ui/src/index.tsx b/packages/merchant-backend-ui/src/index.tsx index 275f63371..4cfe8f7b4 100644 --- a/packages/merchant-backend-ui/src/index.tsx +++ b/packages/merchant-backend-ui/src/index.tsx @@ -15,22 +15,17 @@ */ /** -* -* @author Sebastian Javier Marchano (sebasjm) -*/ + * + * @author Sebastian Javier Marchano (sebasjm) + */ -import { h, VNode, Fragment } from 'preact'; -import { BackendContextProvider } from './context/backend'; -import { TranslationProvider } from './context/translation'; +import { Fragment, h, VNode } from "preact"; +import { BackendContextProvider } from "./context/backend"; +import { TranslationProvider } from "./context/translation"; // import { Page as RequestPayment } from './RequestPayment'; -import "./css/pure-min.css" -import { Route, Router } from 'preact-router'; -import { Footer } from './components/Footer'; -// import OfferTip from './pages/OfferTip'; -// import {OfferRefund} from './pages/OfferRefund'; -// import DepletedTip from './pages/DepletedTip'; -// import RequestPayment from './pages/RequestPayment'; -// import ShowOrderDetails from './pages/ShowOrderDetails'; +import { Route, Router } from "preact-router"; +import { Footer } from "./components/Footer"; +import "./css/pure-min.css"; export default function Application(): VNode { return ( @@ -45,17 +40,12 @@ export default function Application(): VNode { } function ApplicationStatusRoutes(): VNode { - return <Fragment> - <Router> - {/* <Route path="offer_tip" component={OfferTip} /> - <Route path="offer_refund" component={OfferRefund} /> - <Route path="depleted_tip" component={DepletedTip} /> - <Route path="request_payment" component={RequestPayment} /> - <Route path="show_order_details" component={ShowOrderDetails} /> */} - <Route default component={() => <div> - hello! - </div>} /> - </Router> - <Footer /> - </Fragment> + return ( + <Fragment> + <Router> + <Route default component={() => <div>hello!</div>} /> + </Router> + <Footer /> + </Fragment> + ); } diff --git a/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx b/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx index c20f6dc18..a249c4074 100644 --- a/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx +++ b/packages/merchant-backend-ui/src/pages/DeletedTip.stories.tsx @@ -15,26 +15,26 @@ */ /** -* -* @author Sebastian Javier Marchano (sebasjm) -*/ - -import { h, VNode, FunctionalComponent } from 'preact'; -import { DepletedTip as TestedComponent } from './DepletedTip'; + * + * @author Sebastian Javier Marchano (sebasjm) + */ +import { h, VNode, FunctionalComponent } from "preact"; +import { DeletedTip as TestedComponent } from "./DeletedTip"; export default { - title: 'DepletedTip', + title: "DeletedTip", component: TestedComponent, - argTypes: { - }, + argTypes: {}, }; -function createExample<Props>(Component: FunctionalComponent<Props>, props: Partial<Props>) { - const r = (args: any) => <Component {...args} /> - r.args = props - return r +function createExample<Props>( + Component: FunctionalComponent<Props>, + props: Partial<Props>, +) { + const r = (args: any) => <Component {...args} />; + r.args = props; + return r; } -export const Example = createExample(TestedComponent, { -}); +export const Example = createExample(TestedComponent, {}); diff --git a/packages/merchant-backend-ui/src/pages/DeletedTip.tsx b/packages/merchant-backend-ui/src/pages/DeletedTip.tsx index 61fc52cdf..10f3c6a17 100644 --- a/packages/merchant-backend-ui/src/pages/DeletedTip.tsx +++ b/packages/merchant-backend-ui/src/pages/DeletedTip.tsx @@ -29,7 +29,7 @@ function Head(): VNode { return <title>Status of your tip</title>; } -export function DepletedTip(): VNode { +export function DeletedTip(): VNode { return ( <Page> <section> @@ -43,7 +43,7 @@ export function DepletedTip(): VNode { export function mount(): void { try { - render(<DepletedTip />, document.body); + render(<DeletedTip />, document.body); } catch (e) { console.error("got error", e); if (e instanceof Error) { @@ -55,6 +55,6 @@ export function mount(): void { export function buildTimeRendering(): { head: string; body: string } { return { head: renderToString(<Head />), - body: renderToString(<DepletedTip />), + body: renderToString(<DeletedTip />), }; } |