Skip to content

Commit

Permalink
Move home to pages out of api
Browse files Browse the repository at this point in the history
This fixes an error with sentry
  • Loading branch information
andychase committed Sep 20, 2024
1 parent 49c262f commit 36e568d
Show file tree
Hide file tree
Showing 19 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { throttle } from '@/utils/data/throttle';
import { ChatBody, Conversation, Message } from '@/types/chat';
import { Plugin } from '@/types/plugin';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import Spinner from '../Spinner';
import { ChatInput } from './ChatInput';
Expand Down
2 changes: 1 addition & 1 deletion components/Chat/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Message } from '@/types/chat';
import { Plugin } from '@/types/plugin';
import { Prompt } from '@/types/prompt';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import { PluginSelect } from './PluginSelect';
import { PromptList } from './PromptList';
Expand Down
2 changes: 1 addition & 1 deletion components/Chat/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { updateConversation } from '@/utils/app/conversation';

import { Message } from '@/types/chat';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import { CodeBlock } from '../Markdown/CodeBlock';
import { MemoizedReactMarkdown } from '../Markdown/MemoizedReactMarkdown';
Expand Down
2 changes: 1 addition & 1 deletion components/Chat/ModelSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTranslation } from 'next-i18next';

import { OpenAIModel } from '@/types/openai';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

export const ModelSelect = () => {
const { t } = useTranslation('chat');
Expand Down
2 changes: 1 addition & 1 deletion components/Chat/Temperature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';

import { DEFAULT_TEMPERATURE } from '@/utils/app/const';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

interface Props {
label: string;
Expand Down
2 changes: 1 addition & 1 deletion components/Chatbar/Chatbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { LatestExportFormat, SupportedExportFormats } from '@/types/export';
import { OpenAIModels } from '@/types/openai';
import { PluginKey } from '@/types/plugin';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import { ChatFolders } from './components/ChatFolders';
import { ChatbarSettings } from './components/ChatbarSettings';
Expand Down
2 changes: 1 addition & 1 deletion components/Chatbar/components/ChatFolders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useContext } from 'react';

import { FolderInterface } from '@/types/folder';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import Folder from '@/components/Folder';

Expand Down
2 changes: 1 addition & 1 deletion components/Chatbar/components/ChatbarSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useContext, useState } from 'react';

import { useTranslation } from 'next-i18next';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import { SettingDialog } from '@/components/Settings/SettingDialog';

Expand Down
2 changes: 1 addition & 1 deletion components/Chatbar/components/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

import { Conversation } from '@/types/chat';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import SidebarActionButton from '@/components/Buttons/SidebarActionButton';
import ChatbarContext from '@/components/Chatbar/Chatbar.context';
Expand Down
2 changes: 1 addition & 1 deletion components/Chatbar/components/PluginKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';

import { PluginID, PluginKey } from '@/types/plugin';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import { SidebarButton } from '@/components/Sidebar/SidebarButton';

Expand Down
2 changes: 1 addition & 1 deletion components/Folder/Folder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

import { FolderInterface } from '@/types/folder';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import SidebarActionButton from '@/components/Buttons/SidebarActionButton';

Expand Down
2 changes: 1 addition & 1 deletion components/Promptbar/Promptbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { savePrompts } from '@/utils/app/prompts';
import { OpenAIModels } from '@/types/openai';
import { Prompt } from '@/types/prompt';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import { PromptFolders } from './components/PromptFolders';
import { PromptbarSettings } from './components/PromptbarSettings';
Expand Down
2 changes: 1 addition & 1 deletion components/Promptbar/components/PromptFolders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useContext } from 'react';

import { FolderInterface } from '@/types/folder';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

import Folder from '@/components/Folder';
import { PromptComponent } from '@/components/Promptbar/components/Prompt';
Expand Down
2 changes: 1 addition & 1 deletion components/Settings/SettingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getSettings, saveSettings } from '@/utils/app/settings';

import { Settings } from '@/types/settings';

import HomeContext from '@/pages/api/home/home.context';
import HomeContext from '@/pages/home/home.context';

interface Props {
open: boolean;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default, getServerSideProps } from './api/home';
export { default, getServerSideProps } from './home';

0 comments on commit 36e568d

Please sign in to comment.