Styles, API calls, and more

This commit is contained in:
Sean Edmunds
2024-08-13 17:08:16 -05:00
parent 722d8e65ec
commit 1e57c1a19e
34 changed files with 2560 additions and 643 deletions

View File

@@ -1,5 +1,4 @@
import { Stack } from '@mantine/core';
import { useEffect, useState } from 'react';
import stackClasses from '../../styles/Stack.module.css';
import {useQueryAPI} from '../../hooks/useAPI';
import Search from './components/Search';
@@ -9,6 +8,7 @@ import Bookmarks from './components/Bookmarks';
import SettingsButton from './components/SettingsButton';
import { useAtom } from 'jotai';
import { HomepageFilters } from '../../contexts/HomepageFilters';
import { useEffect, useState } from 'react';
export default function Homepage() {

View File

@@ -35,9 +35,10 @@ function AppItem({ url, icon, name }: any) {
gap: 0,
}}
>
<Text className={texts.appName}>{name}</Text>
<Text className={texts.appName} classNames={texts}>{name}</Text>
<Text
className={texts.appUrl}
classNames={texts}
style={{
textDecoration: textDecoration,
}}

View File

@@ -16,10 +16,10 @@ function Applications() {
return (
<Stack id='apps' style={{ gap: 0 }}>
<Text className={texts.sectionTitle}>Applications</Text>
<Text className={texts.sectionTitle} classNames={texts}>Applications</Text>
<Stack
style={{
// background: 'var(--color-background)',
background: 'var(--color-background)',
gap: '.25rem',
backgroundSize: 'cover',
borderBottom: '0px solid',

View File

@@ -25,7 +25,7 @@ function Links() {
<>
{groupsIsFetched && linksIsFetched && categories?.length > 0 && (
<Stack id='links' style={{ gap: 0 }}>
<Text className={texts.sectionTitle}>Bookmarks</Text>
<Text className={texts.sectionTitle} classNames={texts}>Bookmarks</Text>
<Stack
style={{
display: 'grid',

View File

@@ -11,7 +11,7 @@ function LinkGroups({ links, category }: any) {
lineHeight: '1.5rem',
}}
>
<Text className={texts.linkCategory}>{category}</Text>
<Text className={texts.linkCategory} classNames={texts}>{category}</Text>
{links?.map((link: any) => (
<LinkItem key={link.name} link={link} />
))}

View File

@@ -3,7 +3,7 @@ import texts from '../../../styles/Text.module.css';
function LinkItem({ link }: any) {
return (
<Text className={texts.linkItem} component='a' href={link.url}>
<Text className={texts.linkItem} classNames={texts} component='a' href={link.url}>
{link.name}
</Text>
);

View File

@@ -24,7 +24,9 @@ function SettingsButton() {
useEffect(() => {
if(data) {
setCategories(data.map((category: any) => {return {value: category.category, label: category.category}}));
let list: [any] = data.map((category: any) => {return {value: category.category, label: category.category}}) || [];
list.unshift({value: 'All', label: 'All'});
setCategories(list);
}
}, [data, isFetched]);
@@ -41,7 +43,9 @@ function SettingsButton() {
withArrow
shadow='md'
position='top'
classNames={menu}
classNames={{
dropdown: menu.dropdown
}}
styles={{
dropdown: {
backgroundColor: 'var(--color-background)',
@@ -49,7 +53,7 @@ function SettingsButton() {
}}
>
<Menu.Target>
<Button className={button.settingsButton}>
<Button className={button.settingsButton} classNames={button}>
<FiMenu />
</Button>
</Menu.Target>