From afdc52dd61fc178b77bce6e1d8365e166306a629 Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Sun, 6 Apr 2025 21:07:34 +0200 Subject: [PATCH] Format code --- src/assets/svgs/CreateThreadIcon.tsx | 31 +++++++---- src/components/Apps/TabComponent.tsx | 82 +++++++++++++++------------- 2 files changed, 63 insertions(+), 50 deletions(-) diff --git a/src/assets/svgs/CreateThreadIcon.tsx b/src/assets/svgs/CreateThreadIcon.tsx index 549ec2e..13b2442 100644 --- a/src/assets/svgs/CreateThreadIcon.tsx +++ b/src/assets/svgs/CreateThreadIcon.tsx @@ -1,20 +1,27 @@ -import React from 'react'; -import { styled } from '@mui/system'; -import { SVGProps } from './interfaces'; +import React from "react"; +import { styled } from "@mui/system"; +import { SVGProps } from "./interfaces"; // Create a styled container with hover effects -const SvgContainer = styled('svg')({ - '& path': { - fill: 'rgba(41, 41, 43, 1)', // Default to red if no color prop - } +const SvgContainer = styled("svg")({ + "& path": { + fill: "rgba(41, 41, 43, 1)", // Default to red if no color prop + }, }); -export const CreateThreadIcon:React.FC = ({ color, opacity }) => { +export const CreateThreadIcon: React.FC = ({ color, opacity }) => { return ( - - + + - - ); }; diff --git a/src/components/Apps/TabComponent.tsx b/src/components/Apps/TabComponent.tsx index ecf17a7..d13d992 100644 --- a/src/components/Apps/TabComponent.tsx +++ b/src/components/Apps/TabComponent.tsx @@ -1,41 +1,43 @@ -import React from 'react' -import { TabParent } from './Apps-styles' +import { TabParent } from "./Apps-styles"; import NavCloseTab from "../../assets/svgs/NavCloseTab.svg"; -import { getBaseApiReact } from '../../App'; -import { Avatar, ButtonBase } from '@mui/material'; +import { getBaseApiReact } from "../../App"; +import { Avatar, ButtonBase } from "@mui/material"; import LogoSelected from "../../assets/svgs/LogoSelected.svg"; -import { executeEvent } from '../../utils/events'; +import { executeEvent } from "../../utils/events"; import LockIcon from "@mui/icons-material/Lock"; -const TabComponent = ({isSelected, app}) => { +const TabComponent = ({ isSelected, app }) => { return ( - { - if(isSelected){ - executeEvent('removeTab', { - data: app - }) - return + { + if (isSelected) { + executeEvent("removeTab", { + data: app, + }); + return; } - executeEvent('setSelectedTab', { - data: app - }) - }}> - + executeEvent("setSelectedTab", { + data: app, + }); + }} + > + {isSelected && ( - - - - ) } - {app?.isPrivate && !app?.privateAppProperties?.logo ? ( + + )} + {app?.isPrivate && !app?.privateAppProperties?.logo ? ( { width: "28px", }} alt={app?.name} - src={app?.privateAppProperties?.logo ? app?.privateAppProperties?.logo :`${getBaseApiReact()}/arbitrary/THUMBNAIL/${ - app?.name - }/qortal_avatar?async=true`} + src={ + app?.privateAppProperties?.logo + ? app?.privateAppProperties?.logo + : `${getBaseApiReact()}/arbitrary/THUMBNAIL/${ + app?.name + }/qortal_avatar?async=true` + } > { /> )} - + - ) -} + ); +}; -export default TabComponent \ No newline at end of file +export default TabComponent;