New AdventureModal Accordian
This commit is contained in:
@@ -16,22 +16,12 @@ export const load = (async (event) => {
|
||||
let count = 0;
|
||||
let adventures: Adventure[] = [];
|
||||
|
||||
const visited = event.url.searchParams.get('visited');
|
||||
const planned = event.url.searchParams.get('planned');
|
||||
// const visited = event.url.searchParams.get('visited');
|
||||
// const planned = event.url.searchParams.get('planned');
|
||||
|
||||
let typeString: string = '';
|
||||
let typeString: string = 'all';
|
||||
|
||||
if (visited == 'on') {
|
||||
typeString += 'visited';
|
||||
}
|
||||
if (planned == 'on') {
|
||||
if (typeString) {
|
||||
typeString += ',';
|
||||
}
|
||||
typeString += 'planned';
|
||||
} else if (!visited && !planned) {
|
||||
typeString = 'general';
|
||||
}
|
||||
// *** FOR NOW TYPESTRING IS ALWAYS 'ALL' BECAUSE WE DON'T HAVE A WAY TO FILTER BY VISITED/PLANNED YET ***
|
||||
|
||||
const include_collections = event.url.searchParams.get('include_collections') || 'false';
|
||||
const order_by = event.url.searchParams.get('order_by') || 'updated_at';
|
||||
@@ -46,6 +36,7 @@ export const load = (async (event) => {
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if (!initialFetch.ok) {
|
||||
console.error('Failed to fetch visited adventures');
|
||||
return redirect(302, '/login');
|
||||
|
||||
@@ -216,9 +216,9 @@
|
||||
<ul class="menu p-4 w-80 h-full bg-base-200 text-base-content rounded-lg">
|
||||
<!-- Sidebar content here -->
|
||||
<div class="form-control">
|
||||
<h3 class="text-center font-bold text-lg mb-4">Adventure Types</h3>
|
||||
<!-- <h3 class="text-center font-bold text-lg mb-4">Adventure Types</h3> -->
|
||||
<form method="get">
|
||||
<label class="label cursor-pointer">
|
||||
<!-- <label class="label cursor-pointer">
|
||||
<span class="label-text">Completed</span>
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -237,7 +237,7 @@
|
||||
class="checkbox checkbox-primary"
|
||||
checked={currentSort.planned}
|
||||
/>
|
||||
</label>
|
||||
</label> -->
|
||||
<!-- <div class="divider"></div> -->
|
||||
<h3 class="text-center font-bold text-lg mb-4">Sort</h3>
|
||||
<p class="text-lg font-semibold mb-2">Order Direction</p>
|
||||
|
||||
Reference in New Issue
Block a user