Fix categories
This commit is contained in:
@@ -3,12 +3,22 @@
|
||||
import CategoryCard from '$lib/components/CategoryCard.svelte';
|
||||
import SearchBar from '$lib/components/SearchBar.svelte';
|
||||
|
||||
const cats = Object.entries(categories).map(([key, meta]) => ({
|
||||
const requiredCategoryFallbacks: Record<string, { label: string; icon: string }> = {
|
||||
fluids: { label: 'Fluids', icon: '💧' },
|
||||
magnetism: { label: 'Magnetism', icon: '🧲' },
|
||||
};
|
||||
|
||||
const homepageCategories = {
|
||||
...requiredCategoryFallbacks,
|
||||
...categories,
|
||||
};
|
||||
|
||||
const cats = Object.entries(homepageCategories).map(([key, meta]) => ({
|
||||
key,
|
||||
...meta,
|
||||
}));
|
||||
const totalCalculators = calculators.length;
|
||||
const totalCategories = Object.keys(categories).length;
|
||||
const totalCategories = Object.keys(homepageCategories).length;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user