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

ENG-0000 fix(repo): fixes lint, typecheck, and build issues in pnpm-lock.yaml drift #879

Merged
merged 4 commits into from
Oct 31, 2024
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
2 changes: 1 addition & 1 deletion apps/data-populator/app/lib/utils/client-hints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getHints(request?: Request) {
typeof document !== 'undefined'
? document.cookie
: typeof request !== 'undefined'
? (request.headers.get('Cookie') ?? '')
? request.headers.get('Cookie') ?? ''
: ''

return Object.entries(clientHints).reduce(
Expand Down
2 changes: 1 addition & 1 deletion apps/data-populator/app/lib/utils/redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function getRedirectToUrl(
const redirectTo =
options.redirectTo === null
? null
: (options.redirectTo ?? `${requestUrl.pathname}${requestUrl.search}`)
: options.redirectTo ?? `${requestUrl.pathname}${requestUrl.search}`

// Create URLSearchParams if redirectTo is not null
const params = redirectTo ? new URLSearchParams({ redirectTo }) : null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ export const IdentityPopover: React.FC<IdentityPopoverProps> = ({
name={getAtomLabel(selectedIdentity)}
id={
selectedIdentity.is_user === true
? (selectedIdentity.user?.ens_name ??
sliceString(selectedIdentity.user?.wallet, 6, 4))
? selectedIdentity.user?.ens_name ??
sliceString(selectedIdentity.user?.wallet, 6, 4)
: selectedIdentity.identity_id
}
stats={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const IdentitySearchCombobox = ({
value={+formatBalance(value)}
walletAddress={
identity.is_user === true
? (identity.user?.ens_name ??
sliceString(identity.user?.wallet, 6, 4))
? identity.user?.ens_name ??
sliceString(identity.user?.wallet, 6, 4)
: identity.identity_id
}
socialCount={socialCount || 0}
Expand Down
2 changes: 1 addition & 1 deletion apps/portal/app/components/profile/data-about-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const DataAboutHeader: React.FC<DataAboutHeaderProps> = ({
weight="medium"
className="leading-[30px] items-center"
>
{variant === 'claims' ? (totalClaims ?? 0) : (totalPositions ?? 0)}
{variant === 'claims' ? totalClaims ?? 0 : totalPositions ?? 0}
</Text>
</div>
<div className="flex flex-col items-end max-md:items-center">
Expand Down
4 changes: 1 addition & 3 deletions apps/portal/app/components/profile/overview-about-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ export function OverviewAboutHeader({
{variant === 'claims' ? 'Claims' : 'Positions'}
</Text>
<Text variant="bodyLarge" weight="medium" className="items-center">
{variant === 'claims'
? (totalClaims ?? 0)
: (totalPositions ?? 0)}
{variant === 'claims' ? totalClaims ?? 0 : totalPositions ?? 0}
</Text>
</div>
<div className="flex flex-col max-md:items-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ export default function StakeClaimActivity({
let user_assets: string = '0'
user_assets =
(vaultDetails.user_conviction ?? claim.user_conviction_for) > '0'
? (vaultDetails.user_assets ?? claim.user_assets_for)
: (vaultDetails.user_assets_against ?? claim.user_assets_against)
? vaultDetails.user_assets ?? claim.user_assets_for
: vaultDetails.user_assets_against ?? claim.user_assets_against

let assets_sum: string = '0'
assets_sum =
(vaultDetails.assets_sum ?? claim.for_assets_sum) > '0'
? (vaultDetails.assets_sum ?? claim.for_assets_sum)
: (vaultDetails.against_assets_sum ?? claim.against_assets_sum)
? vaultDetails.assets_sum ?? claim.for_assets_sum
: vaultDetails.against_assets_sum ?? claim.against_assets_sum

const userConviction =
vaultDetails.user_conviction ?? claim.user_conviction_for
Expand Down
2 changes: 1 addition & 1 deletion apps/portal/app/components/quest/detail/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function Header({
<div className="flex items-bottom justify-between w-full max-sm:flex-col max-sm:gap-2">
<div className="flex flex-row gap-4 items-center">
<Text variant="heading4" weight="medium">
{position ? `Chapter ${position} : ${title}` : (title ?? '')}
{position ? `Chapter ${position} : ${title}` : title ?? ''}
</Text>
{questAudio && <AudioPlayer audioSrc={questAudio} />}
</div>
Expand Down
15 changes: 7 additions & 8 deletions apps/portal/app/components/stake/stake-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ export default function StakeModal({
} else if (claim) {
user_conviction =
direction === 'for'
? (vaultDetails.user_conviction ?? claim.user_conviction_for)
: (vaultDetails.user_conviction_against ??
claim.user_conviction_against)
? vaultDetails.user_conviction ?? claim.user_conviction_for
: vaultDetails.user_conviction_against ?? claim.user_conviction_against
}

let conviction_price: string = '0'
Expand All @@ -118,9 +117,9 @@ export default function StakeModal({
} else if (claim) {
conviction_price =
direction === 'for'
? (vaultDetails.conviction_price ?? claim.for_conviction_price)
: (vaultDetails.against_conviction_price ??
claim.against_conviction_price)
? vaultDetails.conviction_price ?? claim.for_conviction_price
: vaultDetails.against_conviction_price ??
claim.against_conviction_price
}

let user_assets: string = '0'
Expand All @@ -129,8 +128,8 @@ export default function StakeModal({
} else if (claim) {
user_assets =
direction === 'for'
? (vaultDetails.user_assets ?? claim.user_assets_for)
: (vaultDetails.user_assets_against ?? claim.user_assets_against)
? vaultDetails.user_assets ?? claim.user_assets_for
: vaultDetails.user_assets_against ?? claim.user_assets_against
}

const { min_deposit } = vaultDetails
Expand Down
2 changes: 1 addition & 1 deletion apps/portal/app/lib/utils/client-hints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getHints(request?: Request) {
typeof document !== 'undefined'
? document.cookie
: typeof request !== 'undefined'
? (request.headers.get('Cookie') ?? '')
? request.headers.get('Cookie') ?? ''
: ''

return Object.entries(clientHints).reduce(
Expand Down
2 changes: 1 addition & 1 deletion apps/portal/app/lib/utils/redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function getRedirectToUrl(
const redirectTo =
options.redirectTo === null
? null
: (options.redirectTo ?? `${requestUrl.pathname}${requestUrl.search}`)
: options.redirectTo ?? `${requestUrl.pathname}${requestUrl.search}`

// Create URLSearchParams if redirectTo is not null
const params = redirectTo ? new URLSearchParams({ redirectTo }) : null
Expand Down
8 changes: 4 additions & 4 deletions apps/portal/app/routes/app+/claim+/$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ export default function ClaimDetails() {

const user_assets: string =
(vaultDetails?.user_conviction ?? claim.user_conviction_for) > '0'
? (vaultDetails?.user_assets ?? claim.user_assets_for)
: (vaultDetails?.user_assets_against ?? claim.user_assets_against)
? vaultDetails?.user_assets ?? claim.user_assets_for
: vaultDetails?.user_assets_against ?? claim.user_assets_against

const assets_sum: string =
(vaultDetails?.assets_sum ?? claim.for_assets_sum) > '0'
? (vaultDetails?.assets_sum ?? claim.for_assets_sum)
: (vaultDetails?.against_assets_sum ?? claim.against_assets_sum)
? vaultDetails?.assets_sum ?? claim.for_assets_sum
: vaultDetails?.against_assets_sum ?? claim.against_assets_sum

const userConviction =
vaultDetails?.user_conviction ?? claim.user_conviction_for
Expand Down
2 changes: 1 addition & 1 deletion apps/template/app/lib/utils/client-hints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function getHints(request?: Request) {
typeof document !== 'undefined'
? document.cookie
: typeof request !== 'undefined'
? (request.headers.get('Cookie') ?? '')
? request.headers.get('Cookie') ?? ''
: ''

return Object.entries(clientHints).reduce(
Expand Down
2 changes: 1 addition & 1 deletion apps/template/app/lib/utils/redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function getRedirectToUrl(
const redirectTo =
options.redirectTo === null
? null
: (options.redirectTo ?? `${requestUrl.pathname}${requestUrl.search}`)
: options.redirectTo ?? `${requestUrl.pathname}${requestUrl.search}`

// Create URLSearchParams if redirectTo is not null
const params = redirectTo ? new URLSearchParams({ redirectTo }) : null
Expand Down
Loading
Loading