Skip to content

Commit

Permalink
feat: Hide optional icon (#10762)
Browse files Browse the repository at this point in the history
<!--
Before opening a pull request, please read the [contributing
guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md)
first
-->


<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on updating comments and modifying the
visibility of certain components in the `Task` and `Tasks` components.
It also updates a TypeScript configuration link in the `next-env.d.ts`
file.

### Detailed summary
- Updated TypeScript documentation link in `next-env.d.ts`.
- Commented out the import of `StyledOptionIcon` in `Task.tsx`.
- Changed the rendering of `StyledOptionIcon` to a comment in
`Task.tsx`.
- Commented out the import of `OptionIcon` in `index.tsx`.
- Commented out the condition for rendering options in `Tasks`
component.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
  • Loading branch information
ChefMomota authored Oct 1, 2024
1 parent 5269134 commit 493dbe7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/gamification/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
4 changes: 2 additions & 2 deletions apps/gamification/views/Quest/components/Tasks/Task.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { useSession } from 'next-auth/react'
import { useRouter } from 'next/router'
import { useCallback, useEffect, useMemo, useState } from 'react'
import { styled } from 'styled-components'
import { StyledOptionIcon } from 'views/DashboardQuestEdit/components/Tasks/StyledOptionIcon'
// import { StyledOptionIcon } from 'views/DashboardQuestEdit/components/Tasks/StyledOptionIcon'
import {
TaskBlogPostConfig,
TaskConfigType,
Expand Down Expand Up @@ -432,7 +432,7 @@ export const Task: React.FC<TaskProps> = ({ questId, task, taskStatus, hasIdRegi
<Flex mr="auto">
<Flex position="relative">
{taskIcon(taskType)}
{task.isOptional && <StyledOptionIcon />}
{/* {task.isOptional && <StyledOptionIcon />} */}
</Flex>
<Text ml="16px" bold>
{title || taskNaming(taskType)}
Expand Down
7 changes: 3 additions & 4 deletions apps/gamification/views/Quest/components/Tasks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import { GAMIFICATION_PUBLIC_API } from 'config/constants/endpoints'
import { useProfile } from 'hooks/useProfile'
import { useSiwe } from 'hooks/useSiwe'
import { styled } from 'styled-components'
import { OptionIcon } from 'views/DashboardQuestEdit/components/Tasks/OptionIcon'
import { logGTMClickStartQuestEvent } from 'utils/customGTMEventTracking'
import { SingleQuestData } from 'views/DashboardQuestEdit/hooks/useGetSingleQuestData'
import { MakeProfileModal } from 'views/Quest/components/MakeProfileModal'
import { Task } from 'views/Quest/components/Tasks/Task'
import { VerifyTaskStatus } from 'views/Quest/hooks/useVerifyTaskStatus'
import { useAccount } from 'wagmi'
import { logGTMClickStartQuestEvent } from 'utils/customGTMEventTracking'

const OverlapContainer = styled(Box)`
position: absolute;
Expand Down Expand Up @@ -160,7 +159,7 @@ export const Tasks: React.FC<TasksProps> = ({
/>
))}
</FlexGap>
{hasOptionsInTasks && (
{/* {hasOptionsInTasks && (
<Box ml="8px">
<Box mt="16px">
<Text fontSize="12px" bold as="span" color="textSubtle">
Expand All @@ -181,7 +180,7 @@ export const Tasks: React.FC<TasksProps> = ({
</Text>
)}
</Box>
)}
)} */}
{(!account || !isSiweValid || (isSocialHubFetched && !hasIdRegister)) && !isQuestFinished && (
<OverlapContainer>
{account ? (
Expand Down

0 comments on commit 493dbe7

Please sign in to comment.