Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Revert "refactor: Rename FabWithMenuContext" #3255

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
import { AddMenuContext } from 'modules/drive/AddMenu/AddMenuProvider'
import { useFabStyles } from 'modules/drive/helpers'

const FabWithAddMenuContext = ({ noSidebar }) => {
const FabWithMenuContext = ({ noSidebar }) => {
const { t } = useI18n()

const {
Expand Down Expand Up @@ -42,4 +42,4 @@ const FabWithAddMenuContext = ({ noSidebar }) => {
)
}

export default React.memo(FabWithAddMenuContext)
export default React.memo(FabWithMenuContext)
4 changes: 2 additions & 2 deletions src/modules/views/Drive/DriveFolderView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { removeFromFavorites } from 'modules/actions/components/removeFromFavori
import { makeExtraColumnsNamesFromMedia } from 'modules/certifications'
import { useExtraColumns } from 'modules/certifications/useExtraColumns'
import AddMenuProvider from 'modules/drive/AddMenu/AddMenuProvider'
import FabWithAddMenuContext from 'modules/drive/FabWithAddMenuContext'
import FabWithMenuContext from 'modules/drive/FabWithMenuContext'
import Toolbar from 'modules/drive/Toolbar'
import { useFolderSort } from 'modules/navigation/duck'
import { useSelectionContext } from 'modules/selection/SelectionProvider'
Expand Down Expand Up @@ -241,7 +241,7 @@ const DriveFolderView = () => {
displayedFolder={displayedFolder}
isSelectionBarVisible={isSelectionBarVisible}
>
<FabWithAddMenuContext />
<FabWithMenuContext />
</AddMenuProvider>
)}
<Outlet />
Expand Down
8 changes: 2 additions & 6 deletions src/modules/views/Public/PublicFolderView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { download, trash, rename, versions } from 'modules/actions'
import { makeExtraColumnsNamesFromMedia } from 'modules/certifications'
import { useExtraColumns } from 'modules/certifications/useExtraColumns'
import AddMenuProvider from 'modules/drive/AddMenu/AddMenuProvider'
import FabWithAddMenuContext from 'modules/drive/FabWithAddMenuContext'
import FabWithMenuContext from 'modules/drive/FabWithMenuContext'
import Main from 'modules/layout/Main'
import PublicToolbar from 'modules/public/PublicToolbar'
import { useSelectionContext } from 'modules/selection/SelectionProvider'
Expand Down Expand Up @@ -158,10 +158,6 @@ const PublicFolderView = () => {
// Check if the sharing shortcut has already been created (but not synced)
const isShareAlreadyAdded = sharingInfos?.isSharingShortcutCreated

console.log('==========')
console.log('isFabDisplayed : ', isFabDisplayed)
console.log('==========')

return (
<Main isPublic={true}>
<ModalStack />
Expand Down Expand Up @@ -213,7 +209,7 @@ const PublicFolderView = () => {
displayedFolder={displayedFolder}
isSelectionBarVisible={isSelectionBarVisible}
>
<FabWithAddMenuContext noSidebar={true} />
<FabWithMenuContext noSidebar={true} />
</AddMenuProvider>
)}
<Outlet />
Expand Down
Loading