-
Notifications
You must be signed in to change notification settings - Fork 5
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 #17 from oxen-io/feat/no-ref/metadata
feat: added site metadata and link preview
- Loading branch information
Showing
14 changed files
with
68 additions
and
14 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,13 @@ | ||
import { siteMetadata } from '@/lib/metadata'; | ||
import { ReactNode } from 'react'; | ||
|
||
export async function generateMetadata() { | ||
return siteMetadata({ | ||
title: 'Faucet', | ||
description: 'Claim test SENT to participate in the Session Testnet Incentive Program.', | ||
}); | ||
} | ||
|
||
export default async function FaucetLayout({ children }: { children: ReactNode }) { | ||
return children; | ||
} |
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
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,18 +1,33 @@ | ||
import { getEnvironmentTaggedDomain } from '@session/util/env'; | ||
import type { WagmiMetadata } from '@session/wallet/lib/wagmi'; | ||
import type { Metadata } from 'next'; | ||
|
||
// TODO - Fill out all require site metadata fields | ||
export const siteMetadata: Metadata = { | ||
title: 'Session Staking', | ||
description: 'Session Staking', | ||
}; | ||
const BASE_URL = `https://${getEnvironmentTaggedDomain('stake')}.getsession.org`; | ||
const SITE_TITLE = 'Session Staking Portal'; | ||
const SITE_DESCRIPTION = 'Stake and get rewarded for securing the Session Network.'; | ||
const SITE_IMAGE = `${BASE_URL}/images/link_preview.png`; | ||
const SITE_ICON = `${BASE_URL}/images/icon.png`; | ||
|
||
const url = `https://${getEnvironmentTaggedDomain('stake')}.getsession.org`; | ||
export const siteMetadata = (props: { title?: string; description?: string; image?: string }) => { | ||
const { title, description = SITE_DESCRIPTION, image = SITE_IMAGE } = props; | ||
return { | ||
metadataBase: new URL('https://stake.getsession.org'), | ||
title: `${title ? `${title} | ` : ''}${SITE_TITLE}`, | ||
description, | ||
openGraph: { | ||
title, | ||
description, | ||
images: [ | ||
{ | ||
url: image, | ||
}, | ||
], | ||
}, | ||
}; | ||
}; | ||
|
||
export const wagmiMetadata: WagmiMetadata = { | ||
name: 'Session Staking', | ||
description: 'Session Staking', | ||
url, | ||
icons: [`${url}/images/icon.png`], | ||
name: SITE_TITLE, | ||
description: SITE_DESCRIPTION, | ||
url: BASE_URL, | ||
icons: [SITE_ICON], | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.