chore: refac

This commit is contained in:
Timothy J. Baek 2023-12-26 12:50:52 -08:00
parent f30d16a3fd
commit cc49e0d10f
11 changed files with 239 additions and 397 deletions

View file

@ -1,7 +1,5 @@
<script lang="ts">
import { v4 as uuidv4 } from 'uuid';
import { goto } from '$app/navigation';
import { getChatById } from '$lib/apis/chats';
import { chatId, db, modelfiles } from '$lib/stores';
import toast from 'svelte-french-toast';
@ -10,10 +8,10 @@
export let shareEnabled: boolean = false;
const shareChat = async () => {
const chat = (await $db.getChatById($chatId)).chat;
const chat = (await getChatById(localStorage.token, $chatId)).chat;
console.log('share', chat);
toast.success('Redirecting you to OllamaHub');
toast.success('Redirecting you to OllamaHub');
const url = 'https://ollamahub.com';
// const url = 'http://localhost:5173';