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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user