File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 268268 {/ snippet }
269269 </Sidebar .MenuButton >
270270 </Sidebar .MenuItem >
271- {#if serverState .isAdmin && serverState .sudoEnabled }
272- <Sidebar .MenuItem >
273- <Sidebar .MenuButton >
274- {#snippet child ({ props })}
275- <a href ="/auction" {...props } onclick ={handleClick }>
276- <Gavel />
277- <span class =" ml-3" >Auction</span >
278- </a >
279- {/ snippet }
280- </Sidebar .MenuButton >
281- </Sidebar .MenuItem >
282- {/if }
271+ <Sidebar .MenuItem >
272+ <Sidebar .MenuButton >
273+ {#snippet tooltipContent ()}Auction{/ snippet }
274+ {#snippet child ({ props })}
275+ <a href ="/auction" {...props } onclick ={handleClick }>
276+ <Gavel />
277+ <span class =" ml-3" >Auction</span >
278+ </a >
279+ {/ snippet }
280+ </Sidebar .MenuButton >
281+ </Sidebar .MenuItem >
283282 <Sidebar .MenuItem >
284283 <Sidebar .MenuButton >
285284 {#snippet tooltipContent ()}Docs{/ snippet }
Original file line number Diff line number Diff line change 11import { redirect } from '@sveltejs/kit' ;
22
33export function load ( ) {
4- redirect ( 307 , '/market ' ) ;
4+ redirect ( 307 , '/auction ' ) ;
55}
Original file line number Diff line number Diff line change 11<script lang =" ts" >
2- import { goto } from ' $app/navigation' ;
32 import CreateAuction from ' $lib/components/forms/createAuction.svelte' ;
43 import AuctionLink from ' $lib/components/auctionLink.svelte' ;
54 import AuctionModal from ' $lib/components/auctionModal.svelte' ;
87
98 let selectedAuction: websocket_api .IAuction | null = $state (null );
109
11- // Redirect to /market unless admin with sudo enabled
12- $effect (() => {
13- if (serverState .actingAs !== undefined && ! (serverState .isAdmin && serverState .sudoEnabled )) {
14- goto (' /market' );
15- }
16- });
17-
1810 // Close the modal if the selected auction is deleted
1911 $effect (() => {
2012 if (selectedAuction && ! serverState .auctions .has (selectedAuction .id ! )) {
2517
2618<div class =" mr-auto flex flex-col gap-8 pt-8" >
2719 <h1 class =" text-xl font-bold" >Auction</h1 >
28- <CreateAuction />
20+ {#if serverState .isAdmin && serverState .sudoEnabled }
21+ <CreateAuction />
22+ {/if }
2923
3024 <div class =" grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4" >
3125 {#each Array .from (serverState .auctions .values ()).sort ((a , b ) => (a .transactionTimestamp ?.seconds ?? 0 ) - (b .transactionTimestamp ?.seconds ?? 0 )) as auction }
You can’t perform that action at this time.
0 commit comments