-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
185b2bc
commit f9e6fb8
Showing
20 changed files
with
254 additions
and
84 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
FUEL_PROVIDER_URL=http://beta-4.fuel.network/graphql | ||
FUEL_PROVIDER_URL=http://beta-3.fuel.network/graphql | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
h5, | ||
h6 { | ||
font-weight: 600; | ||
letter-spacing: -0.025em; | ||
} | ||
kbd { | ||
font-size: 0.875rem; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Layout } from '~/systems/Core/components/Layout/Layout'; | ||
import { getTx } from '~/systems/Transaction/actions/get-tx'; | ||
import { TxScreen } from '~/systems/Transaction/screens/TxScreen/TxScreen'; | ||
|
||
type TransactionProps = { | ||
params: { | ||
id: string; | ||
}; | ||
}; | ||
|
||
export default async function Transaction({ params }: TransactionProps) { | ||
const id = params.id; | ||
const tx = await getTx({ id }); | ||
if (!tx) { | ||
throw new Error('Transaction not found'); | ||
} | ||
return ( | ||
<Layout> | ||
<TxScreen transaction={tx} /> | ||
</Layout> | ||
); | ||
} | ||
|
||
// Revalidate cache every 10 seconds | ||
export const revalidate = 10; |
This file was deleted.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use server'; | ||
|
||
import { z } from 'zod'; | ||
import { act } from '~/systems/Core/utils/act-server'; | ||
import { sdk } from '~/systems/Core/utils/sdk'; | ||
|
||
const schema = z.object({ | ||
id: z.string(), | ||
}); | ||
|
||
export const getTx = act(schema, async (input) => { | ||
const { data } = await sdk.getTransaction(input); | ||
return data.transaction; | ||
}); |
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
34 changes: 34 additions & 0 deletions
34
packages/app/src/systems/Transaction/component/TxBreadcrumb/TxBreadcrumb.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use client'; | ||
|
||
import type { BreadcrumbProps } from '@fuels/ui'; | ||
import { | ||
Breadcrumb, | ||
BreadcrumbItem, | ||
BreadcrumbLink, | ||
Copyable, | ||
Icon, | ||
shortAddress, | ||
} from '@fuels/ui'; | ||
import { IconHome } from '@tabler/icons-react'; | ||
import Link from 'next/link'; | ||
|
||
import type { TransactionNode } from '../../types'; | ||
|
||
type TxBreadcrumbProps = BreadcrumbProps & { | ||
transaction: TransactionNode; | ||
}; | ||
|
||
export function TxBreadcrumb({ transaction: tx, ...props }: TxBreadcrumbProps) { | ||
return ( | ||
<Breadcrumb {...props}> | ||
<BreadcrumbLink asChild> | ||
<Link href="/"> | ||
<Icon icon={IconHome} size={24} color="text-muted" /> | ||
</Link> | ||
</BreadcrumbLink> | ||
<BreadcrumbItem> | ||
<Copyable value={tx.id}>{shortAddress(tx.id)}</Copyable> | ||
</BreadcrumbItem> | ||
</Breadcrumb> | ||
); | ||
} |
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
6 changes: 3 additions & 3 deletions
6
packages/app/src/systems/Transaction/component/TxList/TxList.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
Oops, something went wrong.