1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 22:33:17 +00:00

show repos who are used in dialog recently (#7001)

* show repos who are used in dialog recently

* optimize code

* update RecentlyUsedListView props

---------

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries
2024-11-09 16:48:46 +08:00
committed by GitHub
parent f316cbd2a8
commit a6fea93637
5 changed files with 51 additions and 23 deletions

View File

@@ -1,7 +1,12 @@
import React from 'react';
import { Utils } from '../../utils/utils';
const RecentlyUsedListItem = ({ item, isSelected, onItemClick }) => {
const title = item.path === '/' ? item.path : item.path.split('/').pop();
if (!item || typeof item.path !== 'string') {
return '';
}
const title = Utils.getFileName(item.path);
const handleItemClick = () => {
onItemClick(item.repo, item.path);