Clean up unused props

This commit is contained in:
Marshall Polaris 2022-08-26 21:29:06 -07:00
parent 1eddf341e5
commit 69f85cd114

View File

@ -23,11 +23,8 @@ const periodToCutoff = (now: number, period: Period) => {
} }
export const PortfolioValueSection = memo( export const PortfolioValueSection = memo(
function PortfolioValueSection(props: { function PortfolioValueSection(props: { userId: string }) {
userId: string const { userId } = props
disableSelector?: boolean
}) {
const { disableSelector, userId } = props
const [portfolioPeriod, setPortfolioPeriod] = useState<Period>('weekly') const [portfolioPeriod, setPortfolioPeriod] = useState<Period>('weekly')
const [portfolioHistory, setUsersPortfolioHistory] = useState< const [portfolioHistory, setUsersPortfolioHistory] = useState<
@ -48,9 +45,7 @@ export const PortfolioValueSection = memo(
<div> <div>
<Row className="gap-8"> <Row className="gap-8">
<div className="mb-4 w-full"> <div className="mb-4 w-full">
<Col <Col className="items-center justify-center">
className={disableSelector ? 'items-center justify-center' : ''}
>
<div className="text-sm text-gray-500">Portfolio value</div> <div className="text-sm text-gray-500">Portfolio value</div>
<div className="text-lg"> <div className="text-lg">
{formatMoney( {formatMoney(
@ -60,7 +55,6 @@ export const PortfolioValueSection = memo(
</div> </div>
</Col> </Col>
</div> </div>
{!disableSelector && (
<select <select
className="select select-bordered self-start" className="select select-bordered self-start"
value={portfolioPeriod} value={portfolioPeriod}
@ -73,7 +67,6 @@ export const PortfolioValueSection = memo(
{/* Note: 'daily' seems to be broken? */} {/* Note: 'daily' seems to be broken? */}
{/* <option value="daily">Last 24h</option> */} {/* <option value="daily">Last 24h</option> */}
</select> </select>
)}
</Row> </Row>
<PortfolioValueGraph <PortfolioValueGraph
portfolioHistory={portfolioHistory} portfolioHistory={portfolioHistory}