enzostvs HF staff commited on
Commit
01d6816
β€’
1 Parent(s): 063f28a

viewer in saved gen

Browse files
src/lib/components/community/viewer/Viewer.svelte CHANGED
@@ -9,7 +9,7 @@
9
  import Reactions from '../reactions/Reactions.svelte';
10
  import Button from '$lib/components/Button.svelte';
11
 
12
- export let form: Record<string, string>;
13
  let { open, gallery, previous, next } = get(galleryStore);
14
  let loading = false;
15
 
@@ -126,26 +126,28 @@
126
  </div>
127
  </div>
128
  </div>
129
- <footer class="border-t border-neutral-800 px-8 py-6 flex items-center justify-between">
130
- <Button
131
- size="lg"
132
- theme="dark"
133
- disabled={!previous}
134
- loading={loading}
135
- onClick={() => handlePagination(previous)}
136
- >
137
- Previous
138
- </Button>
139
- <Button
140
- size="lg"
141
- theme="light"
142
- loading={loading}
143
- disabled={!next}
144
- onClick={() => handlePagination(next)}
145
- >
146
- Next
147
- </Button>
148
- </footer>
 
 
149
  </div>
150
  {/if}
151
  </div>
 
9
  import Reactions from '../reactions/Reactions.svelte';
10
  import Button from '$lib/components/Button.svelte';
11
 
12
+ export let form: Record<string, string> | undefined = undefined;
13
  let { open, gallery, previous, next } = get(galleryStore);
14
  let loading = false;
15
 
 
126
  </div>
127
  </div>
128
  </div>
129
+ {#if form}
130
+ <footer class="border-t border-neutral-800 px-8 py-6 flex items-center justify-between">
131
+ <Button
132
+ size="lg"
133
+ theme="dark"
134
+ disabled={!previous}
135
+ loading={loading}
136
+ onClick={() => handlePagination(previous)}
137
+ >
138
+ Previous
139
+ </Button>
140
+ <Button
141
+ size="lg"
142
+ theme="light"
143
+ loading={loading}
144
+ disabled={!next}
145
+ onClick={() => handlePagination(next)}
146
+ >
147
+ Next
148
+ </Button>
149
+ </footer>
150
+ {/if}
151
  </div>
152
  {/if}
153
  </div>
src/routes/saved-generations/+page.svelte CHANGED
@@ -1,6 +1,7 @@
1
  <script lang="ts">
2
  import Card from "$lib/components/community/Card.svelte";
3
  import GoTop from "$lib/components/GoTop.svelte";
 
4
 
5
  export let data
6
 
@@ -33,4 +34,5 @@
33
  {/each}
34
  <GoTop />
35
  </div>
 
36
  </main>
 
1
  <script lang="ts">
2
  import Card from "$lib/components/community/Card.svelte";
3
  import GoTop from "$lib/components/GoTop.svelte";
4
+ import GalleryViewer from "$lib/components/community/viewer/Viewer.svelte";
5
 
6
  export let data
7
 
 
34
  {/each}
35
  <GoTop />
36
  </div>
37
+ <GalleryViewer />
38
  </main>