Clean up all references to authenticatedData

- De facto, was being assumed everywhere if authenticatedData is null, that it's not logged in. This isn't true because the data can still be loading. Update the hook to send additional states.
- Bonus: Delete model picker code and a slew of unused imports.
This commit is contained in:
sabaimran
2024-12-21 08:45:43 -08:00
parent cc7fd1163f
commit e9dae4240e
15 changed files with 155 additions and 341 deletions

View File

@@ -38,7 +38,6 @@ import {
Key,
Palette,
UserCircle,
FileMagnifyingGlass,
Trash,
Copy,
CreditCard,
@@ -499,7 +498,6 @@ enum PhoneNumberValidationState {
}
export default function SettingsView() {
const [title, setTitle] = useState("Settings");
const { apiKeys, generateAPIKey, copyAPIKey, deleteAPIKey } = useApiKeys();
const { userConfig: initialUserConfig } = useUserConfig(true);
const [userConfig, setUserConfig] = useState<UserConfig | null>(null);
@@ -514,6 +512,8 @@ export default function SettingsView() {
const { toast } = useToast();
const isMobileWidth = useIsMobileWidth();
const title = "Settings";
const cardClassName =
"w-full lg:w-1/3 grid grid-flow-column border border-gray-300 shadow-md rounded-lg border dark:border-none dark:bg-muted border-opacity-50";