Skip to content

Commit

Permalink
fix: update deps (#702)
Browse files Browse the repository at this point in the history
* fix: update deps

* fix: remove container is there is no chat or no pinned

* fix: update for tests

* fix: remove websocket tests
  • Loading branch information
spaenleh authored May 16, 2024
1 parent 8973652 commit f722ff3
Show file tree
Hide file tree
Showing 5 changed files with 480 additions and 900 deletions.
100 changes: 0 additions & 100 deletions cypress/e2e/ws.cy.ts

This file was deleted.

25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
"@emotion/react": "11.11.4",
"@emotion/styled": "11.11.5",
"@graasp/chatbox": "3.1.0",
"@graasp/query-client": "3.6.0",
"@graasp/sdk": "4.9.0",
"@graasp/query-client": "3.8.0",
"@graasp/sdk": "4.10.1",
"@graasp/translations": "1.28.0",
"@graasp/ui": "4.17.0",
"@mui/icons-material": "5.15.16",
"@graasp/ui": "4.18.0",
"@mui/icons-material": "5.15.17",
"@mui/lab": "5.0.0-alpha.170",
"@mui/material": "5.15.16",
"@mui/material": "5.15.17",
"@sentry/react": "7.114.0",
"classnames": "2.5.1",
"date-fns": "3.6.0",
"i18next": "23.11.3",
"i18next": "23.11.4",
"katex": "0.16.10",
"lodash.isarray": "4.0.0",
"lodash.truncate": "4.4.2",
Expand All @@ -58,12 +58,11 @@
"react-fullscreen-crossbrowser": "1.1.3",
"react-ga4": "2.1.0",
"react-helmet": "6.1.0",
"react-helmet-async": "2.0.4",
"react-i18next": "14.1.1",
"react-intersection-observer": "9.10.2",
"react-quill": "2.0.0",
"react-router": "6.23.0",
"react-router-dom": "6.23.0",
"react-router": "6.23.1",
"react-router-dom": "6.23.1",
"react-toastify": "10.0.5",
"stylis": "4.3.2",
"stylis-plugin-rtl": "2.1.1",
Expand All @@ -76,13 +75,13 @@
"@types/katex": "^0.16.7",
"@types/lodash.isarray": "^4.0.9",
"@types/lodash.truncate": "^4.4.9",
"@types/node": "^20.12.7",
"@types/node": "^20.12.12",
"@types/react": "18.3.2",
"@types/react-dom": "^18.2.25",
"@types/react-dom": "^18.3.0",
"@types/react-helmet": "^6.1.11",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "7.8.0",
"@typescript-eslint/parser": "7.8.0",
"@typescript-eslint/eslint-plugin": "7.9.0",
"@typescript-eslint/parser": "7.9.0",
"@vitejs/plugin-react": "^4.2.1",
"commitlint": "19.3.0",
"concurrently": "8.2.2",
Expand Down
36 changes: 16 additions & 20 deletions src/modules/item/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,16 @@ const FileContent = ({ item }: FileContentProps) => {
/>
);
}

if (isFileError) {
return (
<Alert severity="error">
{translateMessage(FAILURE_MESSAGES.UNEXPECTED_ERROR)}
</Alert>
);
}
const fileItem = (

return (
<FileItem
id={buildFileId(item.id)}
item={item}
Expand All @@ -165,8 +167,6 @@ const FileContent = ({ item }: FileContentProps) => {
onClick={onDownloadClick}
/>
);

return fileItem;
};

const LinkContent = ({ item }: { item: LinkItemType }): JSX.Element => {
Expand All @@ -180,9 +180,11 @@ const LinkContent = ({ item }: { item: LinkItemType }): JSX.Element => {
payload: { type: ActionTriggers.LinkOpen },
});
};
const linkItem = (

return (
<Box id={buildLinkItemId(item.id)}>
<LinkItem
id={item.id}
item={item}
height={SCREEN_MAX_HEIGHT}
memberId={member?.id}
Expand All @@ -194,24 +196,18 @@ const LinkContent = ({ item }: { item: LinkItemType }): JSX.Element => {
/>
</Box>
);

return linkItem;
};

const DocumentContent = ({ item }: { item: DocumentItemType }): JSX.Element => {
const documentItem = (
<DocumentItem
id={buildDocumentId(item.id)}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
showTitle={item.settings?.showTitle}
item={{ ...item, name: item.displayName }}
showCollapse={item.settings?.isCollapsible}
/>
);

return documentItem;
};
const DocumentContent = ({ item }: { item: DocumentItemType }): JSX.Element => (
<DocumentItem
id={buildDocumentId(item.id)}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
showTitle={item.settings?.showTitle}
item={{ ...item, name: item.displayName }}
showCollapse={item.settings?.isCollapsible}
/>
);

const AppContent = ({ item }: { item: AppItemType }): JSX.Element => {
const {
Expand Down
13 changes: 9 additions & 4 deletions src/modules/navigationIsland/NavigationIsland.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ const NavigationIslandBox = (): JSX.Element | false => {
{nextButton}
</Stack>
)}
<Stack direction="row" gap={1}>
{chatButton}
{pinnedButton}
</Stack>
{
// if one of the button is present, show the stack
(chatButton || pinnedButton) && (
<Stack direction="row" gap={1}>
{chatButton}
{pinnedButton}
</Stack>
)
}
</Stack>
</Box>
);
Expand Down
Loading

0 comments on commit f722ff3

Please sign in to comment.