Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Gomez Torquemada
Bunji-app
Commits
c7558d5c
Commit
c7558d5c
authored
1 year ago
by
Daniel Gomez Torquemada
Browse files
Options
Download
Email Patches
Plain Diff
Fixed back page error
parent
81b2826a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.tsx
+1
-1
src/App.tsx
src/pages/OrderDetailPage.tsx
+3
-3
src/pages/OrderDetailPage.tsx
with
4 additions
and
4 deletions
+4
-4
src/App.tsx
+
1
-
1
View file @
c7558d5c
...
...
@@ -29,11 +29,11 @@ const App: React.FC = () => (
<
IonApp
>
<
IonReactRouter
>
<
IonRouterOutlet
>
<
Route
path
=
"/order/:id"
component
=
{
OrderDetailPage
}
/>
<
Route
exact
path
=
"/home"
component
=
{
Home
}
/>
<
Route
exact
path
=
"/"
>
<
Redirect
to
=
"/home"
/>
</
Route
>
<
Route
path
=
"/order/:id"
component
=
{
OrderDetailPage
}
/>
</
IonRouterOutlet
>
</
IonReactRouter
>
</
IonApp
>
...
...
This diff is collapsed.
Click to expand it.
src/pages/OrderDetailPage.tsx
+
3
-
3
View file @
c7558d5c
...
...
@@ -6,10 +6,10 @@ import { Order } from '../models/Order';
interface
OrderDetailProps
extends
RouteComponentProps
<
{
id
:
string
}
>
{}
const
OrderDetailPage
:
React
.
FC
<
OrderDetailProps
>
=
({
match
,
location
})
=>
{
const
order
=
(
location
.
state
as
any
).
order
as
Order
;
const
order
=
(
location
.
state
as
{
order
:
Order
})
?
(
location
.
state
as
{
order
:
Order
}).
order
:
null
;
if
(
!
order
)
{
// Manejar el caso donde no se proporciona ningún pedido
return
<
div
>
No se ha proporcionado ningún pedido
</
div
>;
// Manejar el caso donde no se proporciona ningún pedido
return
<
div
>
No se ha proporcionado ningún pedido
</
div
>;
}
return
(
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help