Remove unnecessary database migration scripts and update info modal text
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
class="text-primary-500 underline">Source Code</a
|
||||
>
|
||||
</p>
|
||||
<p class="py-1">Made with ❤️ in Connecticut.</p>
|
||||
<p class="py-1">Made with ❤️ in the United States.</p>
|
||||
<div
|
||||
class="modal-action items-center"
|
||||
style="display: flex; flex-direction: column; align-items: center; width: 100%;"
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
<button class="btn btn-primary my-2 md:my-0 md:mr-4" on:click={goToLog}
|
||||
>My Log</button
|
||||
>
|
||||
<button
|
||||
class="btn btn-primary my-2 md:my-0 md:mr-4"
|
||||
on:click={goToWorldTravel}>World Tavel Log</button
|
||||
>
|
||||
{/if}
|
||||
<button
|
||||
class="btn btn-primary my-2 md:my-0 md:mr-4"
|
||||
on:click={goToWorldTravel}>World Tavel Log</button
|
||||
>
|
||||
<button class="btn btn-primary my-2 md:my-0" on:click={goToFeatured}
|
||||
>Featured</button
|
||||
>
|
||||
|
||||
@@ -66,4 +66,14 @@ export const worldTravelCountryRegions = pgTable("worldTravelCountryRegions", {
|
||||
country_code: text("country_code")
|
||||
.notNull()
|
||||
.references(() => worldTravelCountries.country_code),
|
||||
});
|
||||
|
||||
export const userVisitedWorldTravel = pgTable("userVisitedWorldTravel", {
|
||||
id: serial("id").primaryKey(),
|
||||
userId: text("user_id")
|
||||
.notNull()
|
||||
.references(() => userTable.id),
|
||||
region_id: varchar("region_id")
|
||||
.notNull()
|
||||
.references(() => worldTravelCountryRegions.id),
|
||||
});
|
||||
@@ -5,15 +5,8 @@
|
||||
|
||||
import AdventureCard from "$lib/components/AdventureCard.svelte";
|
||||
import type { Adventure } from "$lib/utils/types";
|
||||
import {
|
||||
addAdventure,
|
||||
clearAdventures,
|
||||
getAdventures,
|
||||
getNextId,
|
||||
} from "../../services/adventureService";
|
||||
import { onMount } from "svelte";
|
||||
import { exportData } from "../../services/export";
|
||||
import { importData } from "../../services/import";
|
||||
import exportFile from "$lib/assets/exportFile.svg";
|
||||
import deleteIcon from "$lib/assets/deleteIcon.svg";
|
||||
import SucessToast from "$lib/components/SucessToast.svelte";
|
||||
|
||||
@@ -4,10 +4,10 @@ import type { Adventure } from "$lib/utils/types";
|
||||
import { db } from "$lib/db/db.server";
|
||||
import { worldTravelCountries } from "$lib/db/schema";
|
||||
|
||||
export const load: PageServerLoad = async (event) => {
|
||||
if (!event.locals.user) {
|
||||
return redirect(302, "/login");
|
||||
}
|
||||
export const load: PageServerLoad = async () => {
|
||||
// if (!event.locals.user) {
|
||||
// return redirect(302, "/login");
|
||||
// }
|
||||
let response = await db
|
||||
.select()
|
||||
.from(worldTravelCountries)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import AdventureCard from "$lib/components/AdventureCard.svelte";
|
||||
|
||||
export let data: any;
|
||||
console.log(data.response);
|
||||
|
||||
async function nav(loc: string) {
|
||||
goto(`/worldtravel/${loc}`);
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
import { db } from '$lib/db/db.server.js';
|
||||
import { worldTravelCountryRegions } from '$lib/db/schema.js';
|
||||
import { eq } from 'drizzle-orm';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async ({ params, locals }) => {
|
||||
|
||||
export async function load({ params }) {
|
||||
const { countrycode } = params;
|
||||
let data = await db
|
||||
.select()
|
||||
.from(worldTravelCountryRegions)
|
||||
.where(eq(worldTravelCountryRegions.country_code, countrycode))
|
||||
console.log(data)
|
||||
return {
|
||||
regions : data,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user