Doc fetch

This commit is contained in:
Mikan
2025-06-02 19:39:54 +03:00
parent 054cb63d71
commit 546192b96d
11 changed files with 244 additions and 27 deletions

View File

@@ -0,0 +1,47 @@
import { useParams } from 'react-router-dom';
import {useApiDocumentation} from "../../API/hooks.ts";
export function DataPage() {
const { applicationName, endpointName } = useParams<{ applicationName: string; endpointName: string }>();
const {schema} = useApiDocumentation(applicationName || "", endpointName || "");
console.log(schema)
const handleExport = () => {
// Пока пусто
};
const handleAdd = () => {
// Пока пусто
};
const handleFilters = () => {
// Пока пусто
};
return (
<div className="data-page">
<div className="buttons-container">
<button className="export-excel-button" onClick={handleExport}>Экспорт в Excel</button>
<button className="add-button" onClick={handleAdd}>Добавление</button>
<button className="filters-button" onClick={handleFilters}>Фильтры</button>
</div>
<div className="table-container">
<table className="data-table" style={{ overflowX: 'auto', display: 'block' }}>
<thead>
<tr>
<th className="column-header">Header 1</th>
<th className="column-header">Header 2</th>
<th className="column-header">Header 3</th>
<th className="column-header">Header 4</th>
</tr>
</thead>
<tbody>
{/* Тут могут быть строки данных */}
</tbody>
</table>
</div>
</div>
);
}