Remove pinned section from OfficeHome main body and use generated docx templates
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m24s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m24s
This commit is contained in:
parent
707719f4af
commit
3d28f767e0
4 changed files with 8 additions and 17 deletions
|
|
@ -487,8 +487,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
|
||||
const [pinnedFiles, setPinnedFiles] = useState<FileItem[]>([]);
|
||||
useEffect(() => {
|
||||
if (pinnedExpanded) {
|
||||
api.listPinned().then(data => {
|
||||
api.listPinned().then(data => {
|
||||
const items = data.items || [];
|
||||
items.sort((a: FileItem, b: FileItem) => {
|
||||
const idxA = pinnedOrder.indexOf(a.path);
|
||||
|
|
@ -500,8 +499,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
});
|
||||
setPinnedFiles(items);
|
||||
}).catch(console.error);
|
||||
}
|
||||
}, [pinnedExpanded, pinnedOrder, pinnedRefreshCounter]);
|
||||
}, [pinnedOrder, pinnedRefreshCounter]);
|
||||
|
||||
async function handlePinnedDragEnd(sourcePath: string, destPath: string) {
|
||||
const newOrder = [...pinnedOrder];
|
||||
|
|
@ -1908,7 +1906,8 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
<OfficeHome
|
||||
type={appMode}
|
||||
onFileSelect={(file) => setEditingFile(file)}
|
||||
onCreateBlank={(file) => setEditingFile(file)}
|
||||
onCreateBlank={(file) => setEditingFile(file)}
|
||||
onPinChange={() => setPinnedRefreshCounter(c => c + 1)}
|
||||
/>
|
||||
) : (
|
||||
<div className="flex flex-1 overflow-hidden">
|
||||
|
|
|
|||
Reference in a new issue