-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #534 from SiaFoundation/03-21-feat_explorer_host_r…
…evenue_calculator feat: explorer host revenue calculator
- Loading branch information
Showing
7 changed files
with
86 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'explorer': minor | ||
--- | ||
|
||
The explorer now features a host revenue calculator tool. |
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,13 @@ | ||
'use client' | ||
|
||
import { StateError } from '../../components/StateError' | ||
|
||
export default function Page({ error }: { error: Error }) { | ||
console.error(error) | ||
return ( | ||
<StateError | ||
code={500} | ||
message="Error, there was an issue loading the calculator." | ||
/> | ||
) | ||
} |
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,5 @@ | ||
import { StateError } from '../../components/StateError' | ||
|
||
export default function Page() { | ||
return <StateError message="There was an issue loading the calculator." /> | ||
} |
20 changes: 20 additions & 0 deletions
20
apps/explorer/app/host-revenue-calculator/opengraph-image.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,20 @@ | ||
import { getOGImage } from '../../components/OGImage' | ||
|
||
export const alt = 'Faucet' | ||
export const size = { | ||
width: 1200, | ||
height: 630, | ||
} | ||
|
||
export const contentType = 'image/png' | ||
|
||
export default async function Image() { | ||
return getOGImage( | ||
{ | ||
title: 'Host revenue calculator', | ||
subtitle: | ||
'Calculator for modeling revenue based on storage cost, usage, pricing, and collateral.', | ||
}, | ||
size | ||
) | ||
} |
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,31 @@ | ||
import { Metadata } from 'next' | ||
import { routes } from '../../config/routes' | ||
import { buildMetadata } from '../../lib/utils' | ||
import { Container, Heading } from '@siafoundation/design-system' | ||
|
||
export function generateMetadata(): Metadata { | ||
const title = 'Host revenue calculator' | ||
const description = | ||
'Calculator for modeling revenue based on storage cost, usage, pricing, and collateral.' | ||
const url = routes.hostRevenueCalculator.index | ||
return buildMetadata({ | ||
title, | ||
description, | ||
url, | ||
}) | ||
} | ||
|
||
export default function Page() { | ||
return ( | ||
<Container> | ||
<div className="flex flex-col gap-3"> | ||
<Heading>Host Revenue Calculator</Heading> | ||
<iframe | ||
src="https://bafybeiguvt6gevjdyxmruhetnbryyqqdnvwqnwuu3bobjuh35vg4trgvwm.ipfs.fsd.link" | ||
width="100%" | ||
height="1000px" | ||
/> | ||
</div> | ||
</Container> | ||
) | ||
} |
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