design fixes, tables seperate by language, loading and 404 pages, downloads from cms
This commit is contained in:
@@ -37,12 +37,11 @@ export function DocsClient({ lang }: { lang: string }) {
|
||||
async function fetchDocs() {
|
||||
try {
|
||||
setLoading(true);
|
||||
const filterString = `lang = "${lang}"`;
|
||||
// Обращаемся к documents_ru или documents_en
|
||||
const records = await pb
|
||||
.collection("documents")
|
||||
.collection(`documents_${lang}`)
|
||||
.getFullList<PBDocument>({
|
||||
sort: "-created",
|
||||
filter: filterString,
|
||||
});
|
||||
setDocs(records);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user