feat(jszip-dev): add Export button
This commit is contained in:
parent
63ff305d0a
commit
ded47c9db5
|
@ -0,0 +1,29 @@
|
||||||
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
import {createDloadLinkByUrl} from '../utils/download';
|
||||||
|
|
||||||
|
/*destructure props object*/
|
||||||
|
export default function Export({url,file,name}) {
|
||||||
|
|
||||||
|
const handleOnClick = () => {
|
||||||
|
console.log('Export:handleOnClick() started...');
|
||||||
|
//stops
|
||||||
|
//fare zones
|
||||||
|
//version
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<button onClick={handleOnClick}>
|
||||||
|
{name}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
Export.propTypes = {
|
||||||
|
url: PropTypes.string,
|
||||||
|
file: PropTypes.string,
|
||||||
|
name: PropTypes.string
|
||||||
|
};
|
|
@ -3,6 +3,7 @@ import React from 'react';
|
||||||
import Home from './pages/home';
|
import Home from './pages/home';
|
||||||
import Zipping from './pages/zipping';
|
import Zipping from './pages/zipping';
|
||||||
import BtnDLoad from './components/btn-dload';
|
import BtnDLoad from './components/btn-dload';
|
||||||
|
import Export from './components/export';
|
||||||
import config from './config';
|
import config from './config';
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
|
@ -12,9 +13,12 @@ export default function App() {
|
||||||
<Zipping />
|
<Zipping />
|
||||||
<BtnDLoad
|
<BtnDLoad
|
||||||
url={`${config.API}csv-fare-zones`}
|
url={`${config.API}csv-fare-zones`}
|
||||||
file={'fare-zones.csv'}
|
file={'fare-zones.csv'}
|
||||||
name={'fare-zones'}
|
name={'fare-zones'}
|
||||||
/>
|
/>
|
||||||
|
<Export
|
||||||
|
name={'Export'}
|
||||||
|
/>
|
||||||
<Home />
|
<Home />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue