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
+10 -8
View File
@@ -1,7 +1,7 @@
import { IconCheck, IconTrash, IconX } from "@tabler/icons-react";
import { FC, useState } from "react";
import { useTranslation } from "next-i18next";
import { SidebarButton } from "./SidebarButton";
import { IconCheck, IconTrash, IconX } from '@tabler/icons-react';
import { FC, useState } from 'react';
import { useTranslation } from 'next-i18next';
import { SidebarButton } from './SidebarButton';
interface Props {
onClearConversations: () => void;
@@ -10,7 +10,7 @@ interface Props {
export const ClearConversations: FC<Props> = ({ onClearConversations }) => {
const [isConfirming, setIsConfirming] = useState<boolean>(false);
const { t } = useTranslation('sidebar')
const { t } = useTranslation('sidebar');
const handleClearConversations = () => {
onClearConversations();
@@ -18,10 +18,12 @@ export const ClearConversations: FC<Props> = ({ onClearConversations }) => {
};
return isConfirming ? (
<div className="flex hover:bg-[#343541] py-3 px-3 rounded-md cursor-pointer w-full items-center">
<div className="flex w-full cursor-pointer items-center rounded-md py-3 px-3 hover:bg-[#343541]">
<IconTrash size={16} />
<div className="ml-3 flex-1 text-left text-white">{t('Are you sure?')}</div>
<div className="ml-3 flex-1 text-left text-white">
{t('Are you sure?')}
</div>
<div className="flex w-[40px]">
<IconCheck
@@ -45,7 +47,7 @@ export const ClearConversations: FC<Props> = ({ onClearConversations }) => {
</div>
) : (
<SidebarButton
text={t("Clear conversations")}
text={t('Clear conversations')}
icon={<IconTrash size={16} />}
onClick={() => setIsConfirming(true)}
/>