Skip to content

Commit

Permalink
feat: integrate websockets updates
Browse files Browse the repository at this point in the history
  • Loading branch information
codeofmochi committed Sep 26, 2023
1 parent 244ca85 commit bf5436b
Show file tree
Hide file tree
Showing 3 changed files with 1,104 additions and 20 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@graasp/chatbox": "2.0.1",
"@graasp/query-client": "1.5.0",
"@graasp/sdk": "1.4.0",
"@graasp/query-client": "github:graasp/graasp-query-client#websockets",
"@graasp/sdk": "github:graasp/graasp-sdk#websockets",
"@graasp/translations": "1.19.0",
"@graasp/ui": "3.4.0",
"@mui/icons-material": "5.14.6",
Expand Down
9 changes: 2 additions & 7 deletions src/components/RecycleBinScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Box } from '@mui/material';

import { ItemRecord } from '@graasp/sdk/frontend';
import { Loader } from '@graasp/ui';

import { List } from 'immutable';
Expand Down Expand Up @@ -52,11 +51,7 @@ const ToolbarActions = ({ selectedIds }: ToolbarActionsProps): JSX.Element => (

const RecycleBinLoadableContent = (): JSX.Element => {
const { t: translateBuilder } = useBuilderTranslation();
const {
data: recycledEntries,
isLoading,
isError,
} = hooks.useRecycledItemsData();
const { data: recycledItems, isLoading, isError } = hooks.useRecycledItems();
if (isError) {
return <ErrorAlert />;
}
Expand All @@ -72,7 +67,7 @@ const RecycleBinLoadableContent = (): JSX.Element => {
id={RECYCLED_ITEMS_ID}
clickable={false}
title={translateBuilder(BUILDER.RECYCLE_BIN_TITLE)}
items={recycledEntries?.map(({ item }) => item as ItemRecord) ?? List()}
items={recycledItems ?? List()}
actions={RowActions}
ToolbarActions={ToolbarActions}
showThumbnails={false}
Expand Down
Loading

0 comments on commit bf5436b

Please sign in to comment.