fix: fix files to adhere to standard conventions

This commit is contained in:
Daniel D Orlando 2023-04-01 12:56:32 -07:00
parent 9b04ffabca
commit ff757f27cf
7 changed files with 11 additions and 9 deletions

View file

@ -18,7 +18,6 @@ export default function Conversation({ conversation, retainView }) {
const { switchToConversation } = store.useConversation(); const { switchToConversation } = store.useConversation();
const [renaming, setRenaming] = useState(false); const [renaming, setRenaming] = useState(false);
const [titleInput, setTitleInput] = useState(title);
const inputRef = useRef(null); const inputRef = useRef(null);
const { const {
@ -35,6 +34,8 @@ export default function Conversation({ conversation, retainView }) {
toneStyle toneStyle
} = conversation; } = conversation;
const [titleInput, setTitleInput] = useState(title);
const rename = manualSWR(`/api/convos/update`, 'post'); const rename = manualSWR(`/api/convos/update`, 'post');
const bingData = conversationSignature const bingData = conversationSignature

View file

@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil'; import { useRecoilState, useResetRecoilState, useSetRecoilState } from 'recoil';
import { SSE } from '~/utils/sse'; import { SSE } from '~/utils/sse.mjs';
import { useMessageHandler } from '../../utils/handleSubmit'; import { useMessageHandler } from '../../utils/handleSubmit';
import createPayload from '~/utils/createPayload'; import createPayload from '~/utils/createPayload';

View file

@ -6,7 +6,7 @@ import remarkMath from 'remark-math';
import remarkGfm from 'remark-gfm'; import remarkGfm from 'remark-gfm';
import rehypeRaw from 'rehype-raw' import rehypeRaw from 'rehype-raw'
import CodeBlock from './CodeBlock'; import CodeBlock from './CodeBlock';
import { langSubset } from '~/utils/languages'; import { langSubset } from '~/utils/languages.mjs';
const Content = React.memo(({ content }) => { const Content = React.memo(({ content }) => {
let rehypePlugins = [ let rehypePlugins = [

View file

@ -42,5 +42,5 @@ export const ThemeProvider = ({ initialTheme, children }) => {
rawSetTheme(theme); rawSetTheme(theme);
}, [theme]); }, [theme]);
return <ThemeContext.Provider value={{ theme, setTheme }}>{children}</ThemeContext.Provider>; return <ThemeContext.Provider value={{ theme, setTheme }}>{children}</ThemeContext.Provider>
}; };

View file

@ -353,4 +353,4 @@ const langSubset = [
'yaml', 'yaml',
]; ];
module.exports = { languages, langSubset }; export { languages, langSubset };

View file

@ -211,8 +211,9 @@ var SSE = function (url, options) {
}; };
}; };
export { SSE };
// Export our SSE module for npm.js // Export our SSE module for npm.js
if (typeof exports !== 'undefined') { // if (typeof exports !== 'undefined') {
// exports.SSE = SSE; // // exports.SSE = SSE;
module.exports = { SSE }; // module.exports = { SSE };
} // }