Repository URL to install this package:
|
Version:
3.12.16 ▾
|
import { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useExplorer } from '../../hooks';
import { activateShareboxView, selectCurrentViewedShareboxFilesUuids, selectCurrentViewedShareboxFoldersUuids, selectIsShareboxLoading } from '../../slices/sharebox.slice';
import AssetsList from '../AssetsList';
import TopSection from '../TopSection';
import { jsx as _jsx } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
var ShareboxView = function ShareboxView() {
var _useExplorer = useExplorer(),
shareboxPassword = _useExplorer.opts.shareboxPassword;
var dispatch = useDispatch();
var filesUuids = useSelector(selectCurrentViewedShareboxFilesUuids);
var foldersUuids = useSelector(selectCurrentViewedShareboxFoldersUuids);
var isLoading = useSelector(selectIsShareboxLoading);
useEffect(function () {
if (shareboxPassword) {
dispatch(activateShareboxView({
skipViewDispatch: true
}));
}
}, [shareboxPassword]);
return /*#__PURE__*/_jsxs(_Fragment, {
children: [/*#__PURE__*/_jsx(TopSection, {
showHeaderBar: true
}), /*#__PURE__*/_jsx(AssetsList, {
foldersUuids: foldersUuids,
filesUuids: filesUuids,
isInitialLoading: isLoading
})]
});
};
export default ShareboxView;