Skip to content

Commit

Permalink
fix: bump eslint-plugin-prettier from 4.2.1 to 5.2.1
Browse files Browse the repository at this point in the history
Committer: Aamer Aryan <aameraryan@gmail.com>
  • Loading branch information
aameraryan authored and Aamer committed Aug 30, 2024
1 parent 80df494 commit 5c9e640
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 62 deletions.
65 changes: 54 additions & 11 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"eslint-config-standard-with-typescript": "^34.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-promise": "^6.6.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-unused-imports": "^2.0.0",
Expand Down
16 changes: 6 additions & 10 deletions frontend/src/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,12 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
console.error(err);
});
}
useOutsideAlerter(
navRef,
() => {
if (isMobile && navOpen && apiKeyModalState === 'INACTIVE') {
setNavOpen(false);
setIsDocsListOpen(false);
}
},
[navOpen, isDocsListOpen, apiKeyModalState],
);
useOutsideAlerter(navRef, () => {
if (isMobile && navOpen && apiKeyModalState === 'INACTIVE') {
setNavOpen(false);
setIsDocsListOpen(false);
}
}, [navOpen, isDocsListOpen, apiKeyModalState]);

/*
Needed to fix bug where if mobile nav was closed and then window was resized to desktop, nav would still be closed but the button to open would be gone, as per #1 on issue #146
Expand Down
32 changes: 16 additions & 16 deletions frontend/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ function Dropdown({
{selectedValue && 'label' in selectedValue
? selectedValue.label
: selectedValue && 'description' in selectedValue
? `${
selectedValue.value < 1e9
? selectedValue.value + ` (${selectedValue.description})`
: selectedValue.description
}`
: placeholder
? placeholder
: 'From URL'}
? `${
selectedValue.value < 1e9
? selectedValue.value + ` (${selectedValue.description})`
: selectedValue.description
}`
: placeholder
? placeholder
: 'From URL'}
</span>
)}
<img
Expand Down Expand Up @@ -128,14 +128,14 @@ function Dropdown({
{typeof option === 'string'
? option
: option.name
? option.name
: option.label
? option.label
: `${
option.value < 1e9
? option.value + ` (${option.description})`
: option.description
}`}
? option.name
: option.label
? option.label
: `${
option.value < 1e9
? option.value + ` (${option.description})`
: option.description
}`}
</span>
{showEdit && onEdit && (
<img
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/conversation/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export default function Conversation() {
}
}, []);

useEffect(()=>{
useEffect(() => {
fetchStream.current && fetchStream.current.abort();
},[conversationId]);
}, [conversationId]);

useEffect(() => {
const observerCallback: IntersectionObserverCallback = (entries) => {
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/conversation/ConversationBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,11 @@ const ConversationBubble = forwardRef<
<SyntaxHighlighter
{...rest}
PreTag="div"
children={String(children).replace(/\n$/, '')}
language={match[1]}
style={vscDarkPlus}
/>
>
{String(children).replace(/\n$/, '')}
</SyntaxHighlighter>
<div
className={`absolute right-3 top-3 lg:invisible
${type !== 'ERROR' ? 'group-hover:lg:visible' : ''} `}
Expand Down Expand Up @@ -396,8 +397,9 @@ const ConversationBubble = forwardRef<
toggleState={(state: boolean) => {
setIsSidebarOpen(state);
}}
children={<AllSources sources={sources} />}
/>
>
<AllSources sources={sources} />
</Sidebar>
)}
</div>
);
Expand Down
14 changes: 5 additions & 9 deletions frontend/src/modals/DeleteConvModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ export default function DeleteConvModal({
const dispatch = useDispatch();
const { isMobile } = useMediaQuery();
const { t } = useTranslation();
useOutsideAlerter(
modalRef,
() => {
if (isMobile && modalState === 'ACTIVE') {
dispatch(setModalState('INACTIVE'));
}
},
[modalState],
);
useOutsideAlerter(modalRef, () => {
if (isMobile && modalState === 'ACTIVE') {
dispatch(setModalState('INACTIVE'));
}
}, [modalState]);

function handleSubmit() {
handleDeleteAllConv();
Expand Down
14 changes: 5 additions & 9 deletions frontend/src/preferences/APIKeyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@ export default function APIKeyModal({
const modalRef = useRef(null);
const { isMobile } = useMediaQuery();

useOutsideAlerter(
modalRef,
() => {
if (isMobile && modalState === 'ACTIVE') {
setModalState('INACTIVE');
}
},
[modalState],
);
useOutsideAlerter(modalRef, () => {
if (isMobile && modalState === 'ACTIVE') {
setModalState('INACTIVE');
}
}, [modalState]);

function handleSubmit() {
if (key.length <= 1) {
Expand Down

0 comments on commit 5c9e640

Please sign in to comment.