Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed description Image ,Replit from tags #1059 #1062

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions frontend/app/src/bounties/BountyDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ const CodingLabels = styled.div<codingLangProps>`
const BountyDescription = (props: BountiesDescriptionProps) => {
const color = colors['light'];
const [dataValue, setDataValue] = useState([]);
const [replitLink, setReplitLink] = useState('');
// const [replitLink, setReplitLink] = useState('');
const [descriptionImage, setDescriptionImage] = useState('');

useEffect(() => {
if (props.description) {
const found = props?.description.match(/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/);
setReplitLink(
props?.description.match(
/https?:\/\/(www\.)?[replit]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/
)
);
// setReplitLink(
// props?.description.match(
// /https?:\/\/(www\.)?[replit]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/
// )
// );
setDescriptionImage(found && found.length > 0 && found[0]);
}
}, [props]);
Expand Down Expand Up @@ -166,7 +166,7 @@ const BountyDescription = (props: BountiesDescriptionProps) => {
{props.title?.length > 80 ? '...' : ''}
</EuiText>
</div>
{descriptionImage && (
{/* {descriptionImage && ( commented out reason-> #1059
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we removing this? @ecurrencyhodler we need this if there is an image in git that we want to show

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kevkevinpal I think that's what is causing the bounty on the homepage to display that image. We should keep it @gouravmpk . The fix is to prevent the image in the description from being displayed in the bounties home page. It should still be displayed in the bounty itself.

<div className="DescriptionImage">
<img
src={descriptionImage}
Expand All @@ -176,10 +176,10 @@ const BountyDescription = (props: BountiesDescriptionProps) => {
width={'100%'}
/>
</div>
)}
)} */}
</Description>
<LanguageContainer>
{replitLink && (
{/* {replitLink && ( commented out reason-> #1059
<div onClick={() => window.open(replitLink[0])} style={{ display: 'flex' }}>
<CodingLabels
key={0}
Expand All @@ -198,7 +198,7 @@ const BountyDescription = (props: BountiesDescriptionProps) => {
<EuiText className="LanguageText">Replit</EuiText>
</CodingLabels>
</div>
)}
)} */}
{dataValue &&
dataValue?.length > 0 &&
dataValue?.map((lang: any, index: number) => (
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/src/bounties/BountyModalButtonSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ButtonSet = ({ showGithubBtn, ...props }: any) => {
</div>
</ButtonContainer>
)}
{props?.replitLink && (
{/* {props?.replitLink && ( commented out reason-> #1059
<ButtonContainer
topMargin={'16px'}
onClick={() => {
Expand Down Expand Up @@ -76,7 +76,7 @@ const ButtonSet = ({ showGithubBtn, ...props }: any) => {
/>
</div>
</ButtonContainer>
)}
)} */}
{props.tribe && (
<ButtonContainer
topMargin={'16px'}
Expand Down
Loading