Skip to content

Commit

Permalink
Merge pull request #31 from GMX-Blueberry-Club/delete-static-pages
Browse files Browse the repository at this point in the history
Remove statics pages access
  • Loading branch information
nissoh authored Oct 31, 2023
2 parents 010f7bb + c134190 commit b06f1b4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 81 deletions.
81 changes: 10 additions & 71 deletions frontend/src/components/$MainMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,6 @@ export const $MainMenu = ({ walletLink, parentRoute, chainList, showAccount = tr
}),
]



const $treasuryLinks = [
$Link({ $content: $govItem('Treasury', $bagOfCoinsCircle, 'GBC Community-Led Portfolio'), url: '/p/treasury', route: parentRoute })({
click: routeChangeTether()
}),
$anchor(style({ textDecoration: 'none' }), attr({ href: 'https://snapshot.org/#/gbc-nft.eth' }))(
$govItem('Governance', $fileCheckCircle, 'Treasury Governance, 1 GBC = 1 Voting Power')
),
]



const $extraMenuPopover = $Popover({
dismiss: routeChangeMulticast,
$target: $circleButtonAnchor(
Expand All @@ -114,36 +101,13 @@ export const $MainMenu = ({ walletLink, parentRoute, chainList, showAccount = tr
return $column(layoutSheet.spacingBig, style({ marginTop: screenUtils.isMobileScreen ? '-40px' : '' }))(
...screenUtils.isMobileScreen
? [
...$menuItemList,
...$treasuryLinks
...$menuItemList
]
: [],

// ...screenUtils.isMobileScreen ? $menuItemList : [],
$row(layoutSheet.spacingBig, style({ flexWrap: 'wrap', width: '210px' }))(
$anchor(layoutSheet.displayFlex, style({ padding: '0 4px', border: `2px solid ${pallete.horizon}`, borderRadius: '50%', alignItems: 'center', placeContent: 'center', height: '42px', width: '42px' }), attr({ href: 'https://docs.blueberry.club/' }))(
$icon({ $content: $gitbook, width: '22px', viewBox: `0 0 32 32` })
),
$anchor(layoutSheet.displayFlex, style({ padding: '0 4px', border: `2px solid ${pallete.horizon}`, borderRadius: '50%', alignItems: 'center', placeContent: 'center', height: '42px', width: '42px' }), attr({ href: 'https://discord.com/invite/7ZMmeU3z9j' }))(
$icon({ $content: $discord, width: '22px', viewBox: `0 0 32 32` })
),
$anchor(layoutSheet.displayFlex, style({ padding: '0 4px', border: `2px solid ${pallete.horizon}`, borderRadius: '50%', alignItems: 'center', placeContent: 'center', height: '42px', width: '42px' }), attr({ href: 'https://twitter.com/GBlueberryClub' }))(
$icon({ $content: $twitter, width: '22px', viewBox: `0 0 24 24` })
),
$anchor(layoutSheet.displayFlex, style({ padding: '0 4px', border: `2px solid ${pallete.horizon}`, borderRadius: '50%', alignItems: 'center', placeContent: 'center', height: '42px', width: '42px' }), attr({ href: 'https://www.instagram.com/blueberryclub.eth' }))(
$icon({ $content: $instagram, width: '18px', viewBox: `0 0 32 32` })
),
$anchor(layoutSheet.displayFlex, style({ padding: '0 4px', border: `2px solid ${pallete.horizon}`, borderRadius: '50%', alignItems: 'center', placeContent: 'center', height: '42px', width: '42px' }), attr({ href: 'https://github.com/nissoh/blueberry-club' }))(
$icon({ $content: $github, width: '22px', viewBox: `0 0 32 32` })
),
),

$ButtonSecondary({
$content: $Picker([light, dark])({})
})({

}),

})({}),

switchLatest(map(w3p => {
if (w3p === null) {
Expand Down Expand Up @@ -175,24 +139,13 @@ export const $MainMenu = ({ walletLink, parentRoute, chainList, showAccount = tr
// overlayClick: clickPopoverClaimTether()
})


return [
$row(layoutSheet.spacingBig, style({ alignItems: 'center', placeContent: 'center', flex: 1, width: '100%', padding: '30px 0', zIndex: 1000, borderRadius: '12px' }))(
$row(layoutSheet.spacingBig, style({ flex: 1, alignItems: 'center' }))(
$RouterAnchor({ url: '/', route: parentRoute, $anchor: $element('a')($icon({ $content: theme.name === 'dark' ? $logo : $logoFull, width: '55px', viewBox: '0 0 32 32' })) })({
click: routeChangeTether()
}),

screenUtils.isDesktopScreen
? $Dropdown({
$selection: $treasuryStatus,
value: {
value: now(null),
$$option: map(option => option),
list: $treasuryLinks,
}
})({})
: empty(),
$anchor(attr({ href: 'https://www.findgbc.com' }))(
$text(style({ fontSize: '0.7em', marginLeft: '10px' }))("← Go back home"),
$icon({ $content: theme.name === 'dark' ? $logo : $logoFull, width: '55px', viewBox: '0 0 32 32' })
),
),

$row(screenUtils.isDesktopScreen ? layoutSheet.spacingBig : layoutSheet.spacing, style({ flex: 1, alignItems: 'center', placeContent: 'center' }))(
Expand All @@ -209,27 +162,13 @@ export const $MainMenu = ({ walletLink, parentRoute, chainList, showAccount = tr
),

$row(layoutSheet.spacingBig, style({ flex: 1, placeContent: 'flex-end' }))(
$extraMenuPopover,

...screenUtils.isDesktopScreen ? [] : [$extraMenuPopover],
...screenUtils.isDesktopScreen ? [
$circleButtonAnchor(attr({ href: 'https://docs.blueberry.club/' }))(
$icon({ $content: $gitbook, width: '22px', viewBox: `0 0 32 32` })
),
$circleButtonAnchor(attr({ href: 'https://discord.com/invite/7ZMmeU3z9j' }))(
$icon({ $content: $discord, width: '22px', viewBox: `0 0 32 32` })
),
$circleButtonAnchor(attr({ href: 'https://twitter.com/GBlueberryClub' }))(
$icon({ $content: $twitter, width: '22px', viewBox: `0 0 24 24` })
),
// $anchor(layoutSheet.displayFlex, style({ padding: '0 4px', border: `2px solid ${pallete.horizon}`, borderRadius: '50%', alignItems: 'center', placeContent: 'center', height: '42px', width: '42px' }), attr({ href: 'https://www.instagram.com/blueberryclub.eth' }))(
// $icon({ $content: $instagram, width: '18px', viewBox: `0 0 32 32` })
// ),
// $anchor(layoutSheet.displayFlex, style({ padding: '0 4px', border: `2px solid ${pallete.horizon}`, borderRadius: '50%', alignItems: 'center', placeContent: 'center', height: '42px', width: '42px' }), attr({ href: 'https://github.com/nissoh/blueberry-club' }))(
// $icon({ $content: $github, width: '22px', viewBox: `0 0 32 32` })
// ),
$ButtonSecondary({
$content: $Picker([light, dark])({})
})({})
] : []
)

),

{ routeChange: routeChangeMulticast, walletChange, changeNetwork }
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/$ThemePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const $Picker = (themes: Theme[]) => component((
svgOps: style({ fill: pallete.message }),
$content: $svg('path')(attr({ d: 'M22.8 11.039h-1.176c-.664 0-1.2.43-1.2.961 0 .53.536.959 1.2.959H22.8c.662 0 1.2-.429 1.2-.959s-.539-.961-1.2-.961zM12 5.4A6.58 6.58 0 005.4 12a6.58 6.58 0 006.6 6.6 6.58 6.58 0 006.6-6.6c0-3.661-2.941-6.6-6.6-6.6zm0 11.4c-2.653 0-4.8-2.15-4.8-4.8 0-2.653 2.147-4.8 4.8-4.8a4.8 4.8 0 010 9.6zM3.6 12c0-.53-.539-.961-1.2-.961H1.2c-.664 0-1.2.43-1.2.961 0 .53.536.959 1.2.959h1.2c.661 0 1.2-.43 1.2-.959zM12 3.6c.53 0 .959-.536.959-1.2V1.2c0-.664-.43-1.2-.959-1.2-.53 0-.961.536-.961 1.2v1.2c0 .664.43 1.2.961 1.2zm0 16.8c-.53 0-.961.536-.961 1.2v1.2c0 .664.43 1.2.961 1.2.53 0 .959-.536.959-1.2v-1.2c0-.664-.43-1.2-.959-1.2zm8.838-15.88c.47-.47.545-1.154.17-1.528-.374-.375-1.06-.298-1.526.171l-.84.839c-.47.47-.545 1.153-.17 1.528.374.374 1.06.297 1.527-.172l.839-.839zM4.001 18.64l-.84.84c-.47.47-.545 1.152-.17 1.526.374.374 1.059.3 1.526-.17.13-.128.711-.71.84-.838.469-.47.545-1.153.17-1.529-.374-.375-1.06-.296-1.526.17zm.517-15.478c-.468-.47-1.153-.546-1.528-.172-.374.375-.297 1.06.17 1.53.13.128.711.71.84.838.469.47 1.152.546 1.526.172.374-.375.299-1.06-.17-1.528-.128-.13-.708-.712-.838-.84zm14.123 16.837l.84.839c.469.47 1.152.544 1.526.172.375-.375.299-1.06-.17-1.528l-.839-.839c-.47-.469-1.153-.546-1.529-.171-.375.374-.297 1.058.172 1.527z' }))()
}),
$text('Switch Theme')
),
changeThemeEffect
)
Expand Down
16 changes: 7 additions & 9 deletions frontend/src/pages/$Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,11 @@ export const $Main = ({ baseRoute = '' }: Website) => component((

const rootRoute = router.create({ fragment: baseRoute, title: 'GMX Blueberry Club', fragmentsChange })
const pagesRoute = rootRoute.create({ fragment: 'p', title: '' })
const treasuryRoute = pagesRoute.create({ fragment: 'treasury', title: 'Treasury' })
const berryRoute = pagesRoute.create({ fragment: 'berry' }).create({ fragment: /\d+/, title: 'Berry' })
const profileRoute = pagesRoute.create({ fragment: 'profile', title: 'Berry Account' }).create({ fragment: ETH_ADDRESS_REGEXP })
const profileWalletRoute = pagesRoute.create({ fragment: 'wallet', title: 'Wallet Account' })
const labRoute = pagesRoute.create({ fragment: 'lab', title: 'Blueberry Lab' })
const leaderboardRoute = pagesRoute.create({ fragment: /leaderboard.*/, title: 'Leaderboard' })
const leaderboardOldRoiRoute = pagesRoute.create({ fragment: 'feb-roi-old', title: 'Leaderboard' })
const wardrobeRoute = pagesRoute.create({ fragment: 'wardrobe', title: 'Wardrobe' })
const storeRoute = pagesRoute.create({ fragment: 'lab-store', title: 'Store' })
const itemRoute = pagesRoute.create({ fragment: 'item' }).create({ fragment: /\d+/, title: 'Lab Item' })
Expand Down Expand Up @@ -158,11 +156,14 @@ export const $Main = ({ baseRoute = '' }: Website) => component((

router.match(rootRoute)(
$column(layoutSheet.spacingBig, style({ margin: '0 auto', maxWidth: '1080px', gap: screenUtils.isDesktopScreen ? '85px' : '55px', width: '100%' }))(
$Home({
$Leaderboard({
walletLink,
parentRoute: pagesRoute,
treasuryStore,
})({ routeChanges: linkClickTether() })
competitionCumulative: clientApi.competitionCumulative,
parentRoute: pagesRoute
})({
routeChange: linkClickTether(),
requestCompetitionLadder: requestCompetitionLadderTether()
})
)
),

Expand Down Expand Up @@ -327,9 +328,6 @@ export const $Main = ({ baseRoute = '' }: Website) => component((
),

),
router.match(treasuryRoute)(
$Treasury({ walletLink, parentRoute: treasuryRoute, treasuryStore })({})
),

$node(),
)
Expand Down

0 comments on commit b06f1b4

Please sign in to comment.