-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
91 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { algoFormatter } from '@/utils/format' | ||
import SvgAlgorand from './icons/algorand' | ||
import { cn } from '../utils' | ||
|
||
export type Props = { | ||
microAlgo: number | ||
} | ||
|
||
export function DisplayAlgo({ microAlgo }: Props) { | ||
return ( | ||
<div className={cn('flex items-center')}> | ||
{algoFormatter.asAlgo(microAlgo)} | ||
<SvgAlgorand /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import * as React from "react"; | ||
import type { SVGProps } from "react"; | ||
const SvgAlgorand = (props: SVGProps<SVGSVGElement>) => <svg xmlnsXlink="http://www.w3.org/1999/xlink" width="1em" height="1em" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" {...props}><g transform="matrix(1 0 0 1 -446 -347 )"><path d="M 1.7460317460317463 10 L 3.192239858906526 7.495590828924162 L 4.638447971781305 5 L 6.075837742504408 2.495590828924162 L 6.313932980599648 2.0987654320987654 L 6.419753086419753 2.495590828924162 L 6.860670194003527 4.144620811287478 L 6.3668430335097 5 L 4.920634920634921 7.495590828924162 L 3.4832451499118164 10 L 5.211640211640212 10 L 6.657848324514991 7.495590828924162 L 7.4074074074074066 6.1992945326278655 L 7.760141093474426 7.495590828924162 L 8.430335097001764 10 L 9.982363315696649 10 L 9.312169312169312 7.495590828924162 L 8.641975308641975 5 L 8.465608465608465 4.356261022927689 L 9.541446208112875 2.495590828924162 L 7.971781305114638 2.495590828924162 L 7.9188712522045845 2.310405643738977 L 7.372134038800706 0.26455026455026454 L 7.301587301587301 0 L 5.793650793650793 0 L 5.758377425044091 0.05291005291005291 L 4.347442680776014 2.495590828924162 L 2.901234567901235 5 L 1.4638447971781305 7.495590828924162 L 0.017636684303351177 10 L 1.7460317460317463 10 Z " fillRule="nonzero" fill="#ffffff" stroke="none" transform="matrix(1 0 0 1 446 347 )" /></g></svg>; | ||
export default SvgAlgorand; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/features/routing/components/templated-nav-link/templated-nav-link.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { format as dateFnsFormat } from 'date-fns' | ||
import Decimal from 'decimal.js' | ||
|
||
export const dateFormatter = { | ||
asLongDateTime: (date: Date) => dateFnsFormat(date, 'EEEE, dd MMMM yyyy HH:mm:ss'), | ||
} | ||
|
||
export const algoFormatter = { | ||
asAlgo: (microAlgo: number) => new Decimal(microAlgo).dividedBy(1_000_000).toFixed(), | ||
} |