Skip to content

Commit

Permalink
Merge branch 'master' into shellcheck-github-action
Browse files Browse the repository at this point in the history
  • Loading branch information
hkarani authored May 6, 2024
2 parents 4f9d3f4 + 051cb69 commit 2e167d1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions awards.csv
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ dillon-co,helpfulness,#1099,#794,medium-hard,,,#988 did much of the legwork,225k
abhiShandy,pr,#1119,#1110,good-first-issue,,,,20k,[email protected],2024-04-28
felipebueno,issue,#1119,#1110,good-first-issue,,,,2k,[email protected],2024-04-28
SatsAllDay,pr,#1111,#622,medium-hard,,,,500k,[email protected],2024-05-04
itsrealfake,pr,#1130,#622,good-first-issue,,,,20k,[email protected],???
itsrealfake,pr,#1130,#622,good-first-issue,,,,20k,[email protected],2024-05-06
Darth-Coin,issue,#1130,#622,easy,,,,2k,[email protected],2024-05-04
benalleng,pr,#1137,#1125,good-first-issue,,,,20k,[email protected],2024-05-04
SatsAllDay,issue,#1137,#1125,good-first-issue,,,,2k,[email protected],2024-05-04
SatsAllDay,helpfulness,#1137,#1125,good-first-issue,,,,2k,[email protected],2024-05-04
itsrealfake,pr,#1138,#995,good-first-issue,,,,20k,[email protected],???
itsrealfake,pr,#1138,#995,good-first-issue,,,,20k,[email protected],2024-05-06
SouthKoreaLN,issue,#1138,#995,good-first-issue,,,,2k,[email protected],2024-05-04
mateusdeap,helpfulness,#1138,#995,good-first-issue,,,,1k,???,???
felipebueno,pr,#1094,,,,2,,80k,[email protected],???
felipebueno,pr,#1094,,,,2,,80k,[email protected],2024-05-06
benalleng,helpfulness,#1127,#927,good-first-issue,,,,2k,[email protected],2024-05-04
itsrealfake,pr,#1135,#1016,good-first-issue,,,nonideal solution,10k,[email protected],???
itsrealfake,pr,#1135,#1016,good-first-issue,,,nonideal solution,10k,[email protected],2024-05-06
SatsAllDay,issue,#1135,#1016,good-first-issue,,,,1k,[email protected],2024-05-04
s373nZ,issue,#1136,#1107,medium,high,,,50k,???,???
s373nZ,issue,#1136,#1107,medium,high,,,50k,[email protected],2024-05-05
8 changes: 4 additions & 4 deletions components/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function ImageOriginal ({ src, topLevel, rel, tab, children, onClick, ...props }

function ImageProxy ({ src, srcSet: { dimensions, ...srcSetObj } = {}, onClick, topLevel, onError, ...props }) {
const srcSet = useMemo(() => {
if (!srcSetObj) return undefined
if (Object.keys(srcSetObj).length === 0) return undefined
// srcSetObj shape: { [widthDescriptor]: <imgproxyUrl>, ... }
return Object.entries(srcSetObj).reduce((acc, [wDescriptor, url], i, arr) => {
// backwards compatibility: we used to replace image urls with imgproxy urls rather just storing paths
Expand All @@ -79,7 +79,7 @@ function ImageProxy ({ src, srcSet: { dimensions, ...srcSetObj } = {}, onClick,

// get source url in best resolution
const bestResSrc = useMemo(() => {
if (!srcSetObj) return src
if (Object.keys(srcSetObj).length === 0) return src
return Object.entries(srcSetObj).reduce((acc, [wDescriptor, url]) => {
if (!url.startsWith('http')) {
url = new URL(url, process.env.NEXT_PUBLIC_IMGPROXY_URL).toString()
Expand Down Expand Up @@ -107,7 +107,7 @@ function ImageProxy ({ src, srcSet: { dimensions, ...srcSetObj } = {}, onClick,
)
}

const Image = memo(({ className, src, srcSet, sizes, width, height, bestResSrc, onClick, onError }) => {
const Image = memo(({ className, src, srcSet, sizes, width, height, onClick, onError }) => {
const style = width && height
? { '--height': `${height}px`, '--width': `${width}px`, '--aspect-ratio': `${width} / ${height}` }
: undefined
Expand All @@ -116,7 +116,7 @@ const Image = memo(({ className, src, srcSet, sizes, width, height, bestResSrc,
<img
className={className}
// browsers that don't support srcSet and sizes will use src. use best resolution possible in that case
src={bestResSrc}
src={src}
srcSet={srcSet}
sizes={sizes}
width={width}
Expand Down
2 changes: 1 addition & 1 deletion components/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default memo(function Text ({ rel, imgproxyUrls, children, tab, itemId, o
</Link>
)
}
if (text.startsWith('@')) {
if (text.startsWith?.('@')) {
return (
<UserPopover name={text.replace('@', '')}>
<Link
Expand Down
1 change: 1 addition & 0 deletions components/user-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export function User ({ user, rank, statComps, className = 'mb-2', Embellish, ny
<div className={styles.other}>
{statComps.map((Comp, i) => <Comp key={i} user={user} />)}
</div>}
{Embellish && <Embellish rank={rank} />}
</UserBase>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion pages/api/lnurlp/[username]/pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default async ({ query: { username, amount, nostr, comment, payerdata: pa
}

// generate invoice
const expiresAt = datePivot(new Date(), { minutes: 1 })
const expiresAt = datePivot(new Date(), { minutes: 5 })
const invoice = await createInvoice({
description,
description_hash: descriptionHash,
Expand Down

0 comments on commit 2e167d1

Please sign in to comment.