Skip to content

Commit

Permalink
breaking(webpack): removed path import as webpack 5 no longer patches…
Browse files Browse the repository at this point in the history
… node modules to use in the browser
  • Loading branch information
ichim-david committed Feb 22, 2024
1 parent af47007 commit cef8cfb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions searchlib/components/DownloadButton/DownloadButton.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from 'react';
import { Button, Form } from 'semantic-ui-react';
import { withSearch } from '@elastic/react-search-ui';
import path from 'path';

const DownloadButton = (props) => {
const { searchTerm, filters } = props.searchContext;
const { host = 'http://0.0.0.0:9200', elastic_index } = props.appConfig;
const es_url = new URL(host);
es_url.pathname = path.join(elastic_index, '_download');
es_url.pathname = `${elastic_index}/_download`;
return (
<Form action={es_url.href} method="post">
<input
Expand Down

0 comments on commit cef8cfb

Please sign in to comment.