mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-01 19:32:27 +08:00
33 lines
930 B
JavaScript
33 lines
930 B
JavaScript
import React from 'react';
|
|
import { Container, Icon } from '../../components/';
|
|
import { Link } from 'react-router-dom';
|
|
import Path from 'path';
|
|
|
|
import './frequently_access.scss';
|
|
|
|
export class FrequentlyAccess extends React.Component {
|
|
constructor(props){
|
|
super(props);
|
|
}
|
|
|
|
render(){
|
|
if(this.props.files.length < 4) return null;
|
|
return (
|
|
<Container>
|
|
<div className="component_frequently-access">
|
|
{
|
|
this.props.files.map(function(path, index){
|
|
return (
|
|
<Link key={path} to={"/files"+path}>
|
|
<Icon name={'directory'} />
|
|
<div>{Path.basename(path)}</div>
|
|
</Link>
|
|
);
|
|
})
|
|
}
|
|
</div>
|
|
</Container>
|
|
);
|
|
}
|
|
}
|