mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
Cleaner code in main app
This commit is contained in:
@@ -6,10 +6,7 @@
|
||||
import Sidebar from './lib/Sidebar.svelte'
|
||||
import Footer from './lib/Footer.svelte'
|
||||
|
||||
import { apiKeyStorage, chatsStorage } from './lib/Storage.svelte'
|
||||
|
||||
$: sortedChats = $chatsStorage.sort((a, b) => b.id - a.id)
|
||||
$: apiKey = $apiKeyStorage
|
||||
import { apiKeyStorage } from './lib/Storage.svelte'
|
||||
|
||||
// Check if the API key is passed in as a "key" query parameter - if so, save it
|
||||
const urlParams: URLSearchParams = new URLSearchParams(window.location.search)
|
||||
@@ -24,7 +21,7 @@
|
||||
<div class="container is-fullhd">
|
||||
<div class="columns">
|
||||
<div class="column is-one-fifth">
|
||||
<Sidebar bind:apiKey bind:sortedChats />
|
||||
<Sidebar />
|
||||
</div>
|
||||
<div class="column is-four-fifths" id="content">
|
||||
{#key $location}
|
||||
|
||||
Reference in New Issue
Block a user