-
Notifications
You must be signed in to change notification settings - Fork 2
feat: added get sesh button #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
feat: added get sesh button #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new “Get SESH” button linking to the SESH Uniswap pool, integrates it into the header and mobile dropdown, and wires up translations and test IDs.
- Introduced
GetSeshButton
component and integrated it inHeaderClient
andDropdownHamburgerMenu
- Added new URL constant, data-test-id, and locale entry (
getToken
) - Cleaned up an unused import in
AuthModule
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
apps/staking/testing/data-test-ids.tsx | Added Token_Uniswap_Pool_Arb test ID |
apps/staking/locales/en.json | Added "getToken": "Get SESH" translation |
apps/staking/lib/constants.ts | Added URL.TOKEN_UNISWAP_POOL_ARB constant |
apps/staking/components/HeaderClient.tsx | Imported and rendered GetSeshButton in header |
apps/staking/components/GetSeshButton.tsx | New button component for the Uniswap pool link |
apps/staking/components/DropdownHamburgerMenu.tsx | Added “Get SESH” item to the mobile dropdown |
apps/staking/app/faucet/AuthModule.tsx | Removed unused BASE_URL import |
Comments suppressed due to low confidence (1)
apps/staking/components/GetSeshButton.tsx:9
- Consider adding unit or integration tests for the new GetSeshButton component to ensure it renders correctly and the link opens as expected.
export const GetSeshButton = ({ className }: { className?: string }) => {
apps/staking/lib/constants.ts
Outdated
@@ -32,6 +32,7 @@ export enum URL { | |||
SESSION_NODE_SOLO_SETUP_DOCS = 'https://docs.getsession.org/contribute-to-the-session-network/running-a-session-node', | |||
REMOVE_TOKEN_FROM_WATCH_LIST = 'https://support.metamask.io/managing-my-tokens/custom-tokens/how-to-remove-a-token/', | |||
NODE_LIQUIDATION_LEARN_MORE = 'https://docs.getsession.org/class-is-in-session/session-stagenet-single-contributor-node-setup#unlocking-your-stake', | |||
TOKEN_UNISWAP_POOL_ARB= 'https://app.uniswap.org/explore/pools/arbitrum/0x249afd31a49d9bd44259b8f03dd74030d7d41153bc891d12f469c5cb94b03729' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the surrounding enum entries, add a space before the '=' and a trailing comma after the value.
TOKEN_UNISWAP_POOL_ARB= 'https://app.uniswap.org/explore/pools/arbitrum/0x249afd31a49d9bd44259b8f03dd74030d7d41153bc891d12f469c5cb94b03729' | |
TOKEN_UNISWAP_POOL_ARB = 'https://app.uniswap.org/explore/pools/arbitrum/0x249afd31a49d9bd44259b8f03dd74030d7d41153bc891d12f469c5cb94b03729', |
Copilot uses AI. Check for mistakes.
const dictionary = useTranslations('navigation'); | ||
|
||
return ( | ||
<Link href={URL.TOKEN_UNISWAP_POOL_ARB} target="_blank" prefetch className={className}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using target="_blank" on external links, include rel="noopener noreferrer" to prevent potential reverse tabnabbing vulnerabilities.
<Link href={URL.TOKEN_UNISWAP_POOL_ARB} target="_blank" prefetch className={className}> | |
<Link href={URL.TOKEN_UNISWAP_POOL_ARB} target="_blank" rel="noopener noreferrer" prefetch className={className}> |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the "Get SESH" button to improve user access to SESH token information and navigational links.
- Added a new test ID and URL constant for the SESH button.
- Implemented the GetSeshButton component and integrated it into HeaderClient and DropdownHamburgerMenu.
- Updated the locales file with the new "getToken" translation and cleaned up unused imports in AuthModule.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
apps/staking/testing/data-test-ids.tsx | Added new test ID for the SESH button. |
apps/staking/locales/en.json | Added translation "getToken" for the SESH button. |
apps/staking/lib/constants.ts | Added new URL constant for the Uniswap pool token SESH. |
apps/staking/components/HeaderClient.tsx | Integrated GetSeshButton into the header navigation. |
apps/staking/components/GetSeshButton.tsx | Created the new GetSeshButton component. |
apps/staking/components/DropdownHamburgerMenu.tsx | Added a mobile dropdown menu item for the SESH button. |
apps/staking/app/faucet/AuthModule.tsx | Removed an unused import (BASE_URL) for cleanup. |
No description provided.