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

🐞Fix: Github Ticket button in MobileView of Bounty Description #1203

Merged
merged 4 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { ButtonRow, Pad, Img, GithubIconMobile, T, Y, P, D, B, LoomIconMobile }
export default function MobileView(props: CodingViewProps) {
const {
description,
ticketUrl,
ticket_url,
price,
loomEmbedUrl,
estimated_session_length,
Expand All @@ -32,6 +32,8 @@ export default function MobileView(props: CodingViewProps) {
labels,
payBounty,
showPayBounty,
owner_id,
created,
markUnpaid,
paid
} = props;
Expand All @@ -57,7 +59,6 @@ export default function MobileView(props: CodingViewProps) {
<div style={{ padding: 20, overflow: 'auto', height: 'calc(100% - 60px)' }}>
<Pad>
{nametag}

<T>{titleString}</T>

<div
Expand All @@ -68,11 +69,11 @@ export default function MobileView(props: CodingViewProps) {
>
<StatusPill assignee={assignee} paid={paid} />
{assigneeLabel}
{ticketUrl && (
{ticket_url && (
<GithubIconMobile
onClick={(e: any) => {
e.stopPropagation();
window.open(ticketUrl, '_blank');
window.open(ticket_url, '_blank');
}}
>
<img height={'100%'} width={'100%'} src="/static/github_logo.png" alt="github" />
Expand Down Expand Up @@ -152,10 +153,15 @@ export default function MobileView(props: CodingViewProps) {
<ViewTribe {...props} />
<AddToFavorites {...props} />
<CopyLink {...props} />
<ShareOnTwitter {...props} />
<ShareOnTwitter
issueCreated={created}
ownerPubkey={owner_id}
labels={labels}
titleString={titleString}
/>
</ButtonRow>

{markUnpaid}
kevkevinpal marked this conversation as resolved.
Show resolved Hide resolved
{!!paid ? markUnpaid : null}

<LoomViewerRecorder readOnly loomEmbedUrl={loomEmbedUrl} style={{ marginBottom: 20 }} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ export const AddToFavorites = (props: any) => {
};

export const ViewGithub = (props: any) => {
const { ticketUrl, repo, issue } = props;
const { ticket_url, repo, issue } = props;

if (ticketUrl) {
if (ticket_url) {
return (
<Button
text={'Original Ticket'}
text={'Github Ticket'}
color={'white'}
endingIcon={'launch'}
iconSize={14}
style={{ fontSize: 14, height: 48, width: '100%', marginBottom: 20 }}
onClick={() => {
const repoUrl = ticketUrl ? ticketUrl : `https://github.com/${repo}/issues/${issue}`;
const repoUrl = ticket_url ? ticket_url : `https://github.com/${repo}/issues/${issue}`;
sendToRedirect(repoUrl);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function MobileView(props: any) {
price,
person,
created,
ticketUrl,
ticket_url,
assignee,
estimated_session_length,
loomEmbedUrl,
Expand Down Expand Up @@ -78,7 +78,7 @@ function MobileView(props: any) {
{...person}
created={created}
widget={'wanted'}
ticketUrl={ticketUrl}
ticketUrl={ticket_url}
loomEmbedUrl={loomEmbedUrl}
style={{
margin: 0
Expand Down
Loading