diff --git a/config/features.ts b/config/features.ts index e129bb5..a92cd89 100644 --- a/config/features.ts +++ b/config/features.ts @@ -1,5 +1,6 @@ import colors from 'tailwindcss/colors'; import { + base, mainnet, optimism, optimismSepolia, @@ -8,7 +9,7 @@ import { zksyncSepoliaTestnet, } from 'wagmi/chains'; -type WHITELABEL_ENV = 'OPTIMISM' | 'ZK_SYNC'; +type WHITELABEL_ENV = 'OPTIMISM' | 'ZK_SYNC' | 'SUNNY'; const _WHITELABEL_ENV = process.env.NEXT_PUBLIC_WHITELABEL_ENV; @@ -16,7 +17,13 @@ if (!_WHITELABEL_ENV) { throw new Error('NEXT_PUBLIC_WHITELABEL_ENV is not set'); } -if (!(_WHITELABEL_ENV === 'OPTIMISM' || _WHITELABEL_ENV === 'ZK_SYNC')) { +if ( + !( + _WHITELABEL_ENV === 'OPTIMISM' || + _WHITELABEL_ENV === 'ZK_SYNC' || + _WHITELABEL_ENV === 'SUNNY' + ) +) { throw new Error('NEXT_PUBLIC_WHITELABEL_ENV is not set to a valid value'); } @@ -75,6 +82,23 @@ const featureMatrix: Record = { CONFIRMATION_SECOND_BUTTON_LINK: '', CLAIM_FEE: true, }, + SUNNY: { + APP_NAME: 'The Sunny Awards', + BG_IMAGE: { + src: '', + }, + DELEGATION_REQUIRED: false, + DELEGATION_ENABLED: false, + DELEGATES_URL: 'https://vote.zknation.io/dao/delegates', + CONFIRMATION_CHECKMARK_BG_COLOR: 'black', + INTRO_TEXT: + 'Celebrate onchain Summer 2024 and explore the grants from the Sunny Awards. For grantees, this claiming tool offers a self-serve interface to claim your grant.', + ONLY_SHOW_CLAIMABLE: false, + CONFIRMATION_SUBHEADER: '', + CONFIRMATION_SECOND_BUTTON_TEXT: '', + CONFIRMATION_SECOND_BUTTON_LINK: '', + CLAIM_FEE: true, + }, }; export const FEATURES = featureMatrix[_WHITELABEL_ENV]; @@ -97,6 +121,11 @@ export const getChainConfig = () => { appName: 'ZKsync Claim Tool', chains: [mainnet, zksync, zksyncSepoliaTestnet], }; + case 'SUNNY': + return { + appName: 'Sunny Claim Tool', + chains: [mainnet, optimism, optimismSepolia, sepolia], + }; } }; @@ -120,5 +149,11 @@ export const getWhitelabelThemeColors = (): WhitelabelThemeColors => { primaryAction: colors.blue[500], primaryActionButtonBg: colors.blue[900], }; + case 'SUNNY': + return { + bgClaimcardHeader: colors.blue[200], + primaryAction: colors.blue[500], + primaryActionButtonBg: colors.blue[900], + }; } }; diff --git a/public/sunny-logo.png b/public/sunny-logo.png new file mode 100644 index 0000000..889587f Binary files /dev/null and b/public/sunny-logo.png differ diff --git a/src/components/common/images/Logo.tsx b/src/components/common/images/Logo.tsx index 78559c5..ca93df0 100644 --- a/src/components/common/images/Logo.tsx +++ b/src/components/common/images/Logo.tsx @@ -1,13 +1,17 @@ import Image from 'next/image'; import { WHITELABEL_ENV } from '../../../../config/features'; import OpLogo from '../../../../public/op-logo.svg'; +import SunnyLogo from '../../../../public/sunny-logo.png'; import ZkSyncLogo from '../../../../public/zksync_logo_dark.svg'; + const Logo = () => { switch (WHITELABEL_ENV) { case 'OPTIMISM': return OP Logo; case 'ZK_SYNC': return ZKSync Logo; + case 'SUNNY': + return Sunny Logo; default: throw new Error('Invalid WHITE_LABEL_ENV'); }