Skip to content
Closed
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 app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async function Page() {
<hr />
<h3>Item icons</h3>
<div>
The item textures are provided by <a href="https://sky.shiiyu.moe/">SkyCrypt</a>. Internally they use the work of these amazing people.
The item textures are provided by <a href="https://sky.shiiiyu.moe/">SkyCrypt</a>. Internally they use the work of these amazing people.
<p>
<a href="https://minecraft.net/" target="_blank" rel="noreferrer">
Vanilla{' '}
Expand Down
2 changes: 1 addition & 1 deletion components/OptionsMenu/OptionsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function OptionsMenu(props: Props) {
}
} else if (isPlayerPage) {
let player = props.selected as Player
available.push({ title: 'SkyCrypt', url: 'https://sky.shiiyu.moe/stats/' + player?.uuid })
available.push({ title: 'SkyCrypt', url: 'https://sky.shiiiyu.moe/stats/' + player?.uuid })
available.push({ title: 'Plancke', url: 'https://plancke.io/hypixel/player/stats/' + player?.name })
}

Expand Down
17 changes: 14 additions & 3 deletions components/RecentAuctions/RecentAuctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { getHighestPriorityPremiumProduct, getPremiumType, PREMIUM_RANK } from '
import { RECENT_AUCTIONS_FETCH_TYPE_KEY } from '../../utils/SettingsUtils'
import Number from '../Number/Number'
import styles from './RecentAuctions.module.css'
import { useSearchParams } from 'next/navigation'

interface Props {
item: Item
Expand Down Expand Up @@ -43,7 +42,6 @@ function RecentAuctions(props: Props) {
let [isLoggedIn, setIsLoggedIn] = useState(false)
let [noResults, setNoResults] = useState(false)
let wasAlreadyLoggedIn = useWasAlreadyLoggedIn()
let searchParams = useSearchParams()

let itemFilterRef = useRef<ItemFilter>(props.itemFilter)
itemFilterRef.current = props.itemFilter
Expand Down Expand Up @@ -193,6 +191,19 @@ function RecentAuctions(props: Props) {
})
}

function getArchiveHref() {
const archiveSearchParams = new URLSearchParams()

Object.entries(props.itemFilter || {}).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') {
archiveSearchParams.set(key, value.toString())
}
})

const archiveSearch = archiveSearchParams.toString()
return `/item/${props.item.tag}/archive${archiveSearch ? `?${archiveSearch}` : ''}`
}

let recentAuctionList = recentAuctions.map(recentAuction => {
return (
<div key={recentAuction.uuid} className={styles.cardWrapper}>
Expand Down Expand Up @@ -288,7 +299,7 @@ function RecentAuctions(props: Props) {
{premiumType?.priority >= PREMIUM_RANK.PREMIUM_PLUS ? (
<Link
style={{ textAlign: 'center', marginBottom: '15px' }}
href={`/item/${props.item.tag}/archive?${searchParams.has('itemFilter') ? `?${searchParams.get('itemFilter')}` : ''}`}
href={getArchiveHref()}
>
<Button>Archived Auctions</Button>
</Link>
Expand Down
3 changes: 1 addition & 2 deletions orval.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-expect-error Orval's package exports are resolved correctly at runtime, but this workspace tsconfig does not resolve them in config files.
import { defineConfig } from 'orval';

export default defineConfig({
Expand All @@ -14,4 +13,4 @@ export default defineConfig({
httpClient: 'fetch'
},
},
});
});
102 changes: 57 additions & 45 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.