Skip to content

Commit

Permalink
Hide calendar dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
avgupta456 committed Nov 23, 2023
1 parent fcaec2c commit 5fe3433
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 10 additions & 6 deletions frontend/src/components/Wrapped/Specifics/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const Calendar = ({
endDate,
highlightDays,
highlightColors,
downloadLoading,
}) => {
const newData = data?.calendar_data?.days || [];

Expand Down Expand Up @@ -69,12 +70,14 @@ const Calendar = ({
<p className="text-lg lg:text-xl font-semibold">
Contribution Calendar
</p>
<Input
className="hidden lg:block w-48 border-2 border-gray-300"
options={valueOptions}
selectedOption={value}
setSelectedOption={setValue}
/>
{!downloadLoading && (
<Input
className="hidden lg:block w-48 border-2 border-gray-300"
options={valueOptions}
selectedOption={value}
setSelectedOption={setValue}
/>
)}
</div>
<div className="flex flex-col h-48">
<p className="lg:text-lg">{`${numEvents} ${value.label}`}</p>
Expand Down Expand Up @@ -112,6 +115,7 @@ Calendar.propTypes = {
endDate: PropTypes.string.isRequired,
highlightDays: PropTypes.arrayOf(PropTypes.number),
highlightColors: PropTypes.arrayOf(PropTypes.string).isRequired,
downloadLoading: PropTypes.bool.isRequired,
};

Calendar.defaultProps = {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Wrapped/Wrapped.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const WrappedScreen = () => {
endDate={`${year}-12-31`}
highlightDays={highlightDays}
highlightColors={highlightColors}
downloadLoading={downloadLoading}
/>
</div>
<div className="w-1/2 md:w-1/4 lg:w-1/5">
Expand Down

0 comments on commit 5fe3433

Please sign in to comment.