File tree Expand file tree Collapse file tree 4 files changed +20
-25
lines changed
apps/web/src/lib/components Expand file tree Collapse file tree 4 files changed +20
-25
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 25
25
26
26
<div class =" drawer drawer-end" >
27
27
<input id =" drawer-toggle" type =" checkbox" class =" drawer-toggle" />
28
- <div class =" flex flex-col w-screen h -screen overflow-hidden drawer-content" >
28
+ <div class =" flex flex-col h-dvh w -screen overflow-hidden drawer-content" >
29
29
<label bind:this ={drawerToggle } for =" drawer-toggle" />
30
30
<slot />
31
31
</div >
32
32
<div class =" drawer-side z-50" >
33
33
<label for =" drawer-toggle" aria-label =" close sidebar" class =" drawer-overlay" ></label >
34
- <div class =" bg-base-200 text-base-content h- screen" >
34
+ <div class =" bg-base-200 text-base-content flex flex-col h-dvh w- screen overflow-hidden md:w-80 lg:w-96 relative " >
35
35
<svelte:component this ={drawerContent } {...drawerContentProps } />
36
36
</div >
37
37
</div >
Original file line number Diff line number Diff line change 2
2
import AbsoluteCenter from ' $lib/components/AbsoluteCenter.svelte' ;
3
3
import { things } from ' $lib/stores/things' ;
4
4
import LoadingSpinner from ' $lib/components/LoadingSpinner.svelte' ;
5
- import Contents from ' $lib/components/Drawer' ;
6
5
import Details from ' ./Details.svelte' ;
6
+ import { locale } from ' $lib/language/translate' ;
7
7
8
8
export let id: string ;
9
9
10
10
$ : details = things .details (id );
11
11
$ : loading = $details .loading ;
12
12
$ : thing = $details .value ;
13
+ $ : thingName = $locale === ' en' ? thing ?.name : thing ?.spanishName ?? thing ?.name ;
13
14
</script >
14
15
15
- <Contents >
16
- {#if loading }
17
- <AbsoluteCenter >
18
- <LoadingSpinner />
19
- </AbsoluteCenter >
20
- {:else }
21
- <Details
22
- id ={thing .id }
23
- name ={thing .name }
24
- image ={thing .image }
25
- categories ={thing .categories }
26
- stock ={thing .stock }
27
- available ={thing .available }
28
- availableDate ={thing .availableDate }
29
- items ={thing .items }
30
- />
31
- {/if }
32
- </Contents >
16
+ {#if loading }
17
+ <AbsoluteCenter >
18
+ <LoadingSpinner />
19
+ </AbsoluteCenter >
20
+ {:else }
21
+ <Details
22
+ id ={thing .id }
23
+ name ={thingName }
24
+ image ={thing .image }
25
+ categories ={thing .categories }
26
+ stock ={thing .stock }
27
+ available ={thing .available }
28
+ availableDate ={thing .availableDate }
29
+ items ={thing .items }
30
+ />
31
+ {/if }
You can’t perform that action at this time.
0 commit comments