Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
018283f7
Commit
018283f7
authored
May 29, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The date is formatted now to indicate how far we're from the provided date
parent
028b64de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
TransactionInformationsItem.tsx
src/components/TransactionInformationsItem.tsx
+7
-1
No files found.
src/components/TransactionInformationsItem.tsx
View file @
018283f7
import
type
{
PaymentCode
}
from
"@/utils/requests/Types"
;
import
type
{
PaymentCode
}
from
"@/utils/requests/Types"
;
import
moment
from
"moment"
;
import
"moment/locale/fr"
;
import
PaymentOption
from
"./PaymentOption"
;
import
PaymentOption
from
"./PaymentOption"
;
import
Box
from
"./bases/Box"
;
import
Box
from
"./bases/Box"
;
import
Text
from
"./bases/Text"
;
import
Text
from
"./bases/Text"
;
...
@@ -11,7 +13,11 @@ interface Props {
...
@@ -11,7 +13,11 @@ interface Props {
status
:
"SUCCESS"
|
"INITIATED"
|
"FAILED"
;
status
:
"SUCCESS"
|
"INITIATED"
|
"FAILED"
;
}
}
moment
.
locale
(
"fr"
);
const
TransactionInformationsItem
=
({
paymentType
,
reference
,
date
,
amount
,
status
}:
Props
)
=>
{
const
TransactionInformationsItem
=
({
paymentType
,
reference
,
date
,
amount
,
status
}:
Props
)
=>
{
// date = new Date(date);
const
dateObject
=
Date
.
parse
(
date
);
return
(
return
(
<
Box
<
Box
// height={60}
// height={60}
...
@@ -35,7 +41,7 @@ const TransactionInformationsItem = ({ paymentType, reference, date, amount, sta
...
@@ -35,7 +41,7 @@ const TransactionInformationsItem = ({ paymentType, reference, date, amount, sta
</
Box
>
</
Box
>
<
Box
height=
{
50
}
flex=
{
1
}
>
<
Box
height=
{
50
}
flex=
{
1
}
>
<
Text
variant=
{
"black"
}
>
{
reference
}
</
Text
>
<
Text
variant=
{
"black"
}
>
{
reference
}
</
Text
>
<
Text
>
{
date
}
</
Text
>
<
Text
>
{
moment
(
dateObject
).
fromNow
()
}
</
Text
>
</
Box
>
</
Box
>
<
Box
style=
{
{
marginLeft
:
"auto"
}
}
height=
{
50
}
>
<
Box
style=
{
{
marginLeft
:
"auto"
}
}
height=
{
50
}
>
{
/* <Text variant={"softYellow"} fontWeight={"bold"}>
{
/* <Text variant={"softYellow"} fontWeight={"bold"}>
...
...
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