feat(jszip-dev): add Export button

This commit is contained in:
dancingCycle 2024-04-25 09:22:05 +02:00
parent 63ff305d0a
commit ded47c9db5
2 changed files with 36 additions and 3 deletions

View File

@ -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
};

View File

@ -3,6 +3,7 @@ import React from 'react';
import Home from './pages/home';
import Zipping from './pages/zipping';
import BtnDLoad from './components/btn-dload';
import Export from './components/export';
import config from './config';
export default function App() {
@ -12,9 +13,12 @@ export default function App() {
<Zipping />
<BtnDLoad
url={`${config.API}csv-fare-zones`}
file={'fare-zones.csv'}
name={'fare-zones'}
/>
file={'fare-zones.csv'}
name={'fare-zones'}
/>
<Export
name={'Export'}
/>
<Home />
</div>
)