import React from 'react'; import { gettext, repoID, permission, siteRoot, initialFilePath } from '../constants'; function PathToolbar() { let trashUrl = ''; let historyUrl = ''; if (initialFilePath === '/' && permission) { trashUrl = siteRoot + 'repo/recycle/' + repoID + '/?referer=' + encodeURIComponent(location.href); historyUrl = siteRoot + 'repo/history/' + repoID + '/?referer=' + encodeURIComponent(location.href); return ( ); } else if (permission) { trashUrl = siteRoot + 'dir/recycle/' + repoID + '/?dir_path=' + encodeURIComponent(initialFilePath); return ( ); } return ''; } export default PathToolbar;