Skip to content

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

yougotwill
Copy link
Collaborator

No description provided.

@yougotwill yougotwill requested review from Copilot and Aerilym May 21, 2025 13:18
Copy link

@Copilot Copilot AI left a 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 in HeaderClient and DropdownHamburgerMenu
  • 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 }) => {

@@ -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'
Copy link
Preview

Copilot AI May 21, 2025

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.

Suggested change
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}>
Copy link
Preview

Copilot AI May 21, 2025

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.

Suggested change
<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.

@yougotwill yougotwill requested a review from Copilot May 21, 2025 13:23
Copy link

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant