feat: add in prettier and format code for consistency (#168)

This commit is contained in:
Simon Holmes
2023-03-26 05:13:18 +00:00
committed by GitHub
parent b843f6e0e0
commit d6973b9ccc
72 changed files with 1140 additions and 4573 deletions
+15 -10
View File
@@ -1,16 +1,19 @@
import { ChatFolder, Conversation } from "@/types";
import { cleanConversationHistory } from "@/utils/app/clean";
import { IconFileImport } from "@tabler/icons-react";
import { useTranslation } from "next-i18next";
import { FC } from "react";
import { SidebarButton } from "./SidebarButton";
import { ChatFolder, Conversation } from '@/types';
import { cleanConversationHistory } from '@/utils/app/clean';
import { IconFileImport } from '@tabler/icons-react';
import { useTranslation } from 'next-i18next';
import { FC } from 'react';
import { SidebarButton } from './SidebarButton';
interface Props {
onImport: (data: { conversations: Conversation[]; folders: ChatFolder[] }) => void;
onImport: (data: {
conversations: Conversation[];
folders: ChatFolder[];
}) => void;
}
export const Import: FC<Props> = ({ onImport }) => {
const { t } = useTranslation("sidebar");
const { t } = useTranslation('sidebar');
return (
<>
<input
@@ -38,10 +41,12 @@ export const Import: FC<Props> = ({ onImport }) => {
/>
<SidebarButton
text={t("Import conversations")}
text={t('Import conversations')}
icon={<IconFileImport size={16} />}
onClick={() => {
const importFile = document.querySelector("#import-file") as HTMLInputElement;
const importFile = document.querySelector(
'#import-file',
) as HTMLInputElement;
if (importFile) {
importFile.click();
}