chore(*): use prettier for formatting

This commit is contained in:
Cory Dransfeldt 2025-06-14 16:43:12 -07:00
parent 6c659fe1d0
commit 029caaaa9e
No known key found for this signature in database
73 changed files with 1390 additions and 794 deletions

View file

@ -1,23 +1,20 @@
import EleventyFetch from "@11ty/eleventy-fetch";
import EleventyFetch from '@11ty/eleventy-fetch';
const { POSTGREST_URL, POSTGREST_API_KEY } = process.env;
const fetchAllNavigation = async () => {
try {
const data = await EleventyFetch(
`${POSTGREST_URL}/optimized_navigation?select=*`,
{
duration: "1d",
type: "json",
fetchOptions: {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${POSTGREST_API_KEY}`,
},
},
},
);
const data = await EleventyFetch(`${POSTGREST_URL}/optimized_navigation?select=*`, {
duration: '1d',
type: 'json',
fetchOptions: {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${POSTGREST_API_KEY}`
}
}
});
const nav = data.reduce((acc, item) => {
const navItem = {
@ -25,7 +22,7 @@ const fetchAllNavigation = async () => {
permalink: item.permalink || item.page_permalink,
icon: item.icon,
section: item.section,
sort: item.sort,
sort: item.sort
};
if (!acc[item.menu_location]) {
@ -43,7 +40,7 @@ const fetchAllNavigation = async () => {
return nav;
} catch (error) {
console.error("Error fetching navigation data:", error);
console.error('Error fetching navigation data:', error);
return {};
}
};