From 861347c0c2d532631474732e9eca5a199fa8e911 Mon Sep 17 00:00:00 2001 From: ingawei Date: Thu, 29 Sep 2022 17:44:04 -0700 Subject: [PATCH] getting rid of predict button at bottom --- web/components/page.tsx | 2 -- web/components/scroll-to-top-button.tsx | 13 +++++++++---- web/pages/[username]/[contractSlug].tsx | 17 ++--------------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/web/components/page.tsx b/web/components/page.tsx index 5e150ba3..f72db80e 100644 --- a/web/components/page.tsx +++ b/web/components/page.tsx @@ -3,7 +3,6 @@ import { ReactNode } from 'react' import { BottomNavBar } from './nav/bottom-nav-bar' import Sidebar from './nav/sidebar' import { Toaster } from 'react-hot-toast' -import { ScrollToTopButton } from './scroll-to-top-button' export function Page(props: { rightSidebar?: ReactNode @@ -54,7 +53,6 @@ export function Page(props: { - ) diff --git a/web/components/scroll-to-top-button.tsx b/web/components/scroll-to-top-button.tsx index 22661229..ffe001f3 100644 --- a/web/components/scroll-to-top-button.tsx +++ b/web/components/scroll-to-top-button.tsx @@ -1,7 +1,8 @@ -import { ArrowCircleUpIcon } from '@heroicons/react/solid' +import { ArrowCircleUpIcon, ArrowUpIcon } from '@heroicons/react/solid' import clsx from 'clsx' import { useEffect, useState } from 'react' import { Button } from './button' +import { Row } from './layout/row' export function ScrollToTopButton(props: { className?: string }) { const { className } = props @@ -9,7 +10,7 @@ export function ScrollToTopButton(props: { className?: string }) { useEffect(() => { window.addEventListener('scroll', () => { - if (window.scrollY > 400) { + if (window.scrollY > 500) { console.log('button commence') setVisible(true) } else { @@ -28,12 +29,16 @@ export function ScrollToTopButton(props: { className?: string }) { return ( ) } diff --git a/web/pages/[username]/[contractSlug].tsx b/web/pages/[username]/[contractSlug].tsx index b65f22ff..6dacdde2 100644 --- a/web/pages/[username]/[contractSlug].tsx +++ b/web/pages/[username]/[contractSlug].tsx @@ -48,6 +48,7 @@ import BetButton from 'web/components/bet-button' import { BetsSummary } from 'web/components/bet-summary' import { listAllComments } from 'web/lib/firebase/comments' import { ContractComment } from 'common/comment' +import { ScrollToTopButton } from 'web/components/scroll-to-top-button' export const getStaticProps = fromPropz(getStaticPropz) export async function getStaticPropz(props: { @@ -274,23 +275,9 @@ export function ContractPageContent( userBets={userBets} comments={comments} /> - - {!user ? ( - - - - - ) : ( - outcomeType === 'BINARY' && - allowTrade && ( - - ) - )} + ) }