diff --git a/biome.json b/biome.json
index 24e4dfa..f019285 100644
--- a/biome.json
+++ b/biome.json
@@ -1,9 +1,7 @@
{
- "organizeImports": {
- "enabled": true
- },
+ "assist": { "actions": { "source": { "organizeImports": "on" } } },
"files": {
- "ignore": ["./node_modules/", "./dist/", "./.nx/"],
+ "includes": ["./src/**/*.{ts,tsx,js,jsx}"],
"ignoreUnknown": true
},
"linter": {
@@ -11,8 +9,7 @@
"rules": {
"recommended": true,
"a11y": {
- "noSvgWithoutTitle": "off",
- "all": true
+ "noSvgWithoutTitle": "off"
},
"complexity": {
"noUselessTypeConstraint": "off",
@@ -20,9 +17,9 @@
},
"suspicious": {
"noExplicitAny": "off",
- "noConsoleLog": "error",
"noImplicitAnyLet": "off",
- "recommended": true
+ "recommended": true,
+ "noConsole": { "level": "error", "options": { "allow": ["error", "log"] } }
},
"correctness": {
"useExhaustiveDependencies": "off",
@@ -32,12 +29,24 @@
"performance": {
"noDelete": "off",
"recommended": true
+ },
+ "style": {
+ "noParameterAssign": "error",
+ "useAsConstAssertion": "error",
+ "useDefaultParameterLast": "error",
+ "useEnumInitializers": "error",
+ "useSelfClosingElements": "error",
+ "useSingleVarDeclarator": "error",
+ "noUnusedTemplateLiteral": "error",
+ "useNumberNamespace": "error",
+ "noInferrableTypes": "error",
+ "noUselessElse": "error"
}
}
},
"formatter": {
"enabled": true,
- "formatWithErrors": false,
+ "formatWithErrors": true,
"indentStyle": "tab",
"indentWidth": 2,
"lineWidth": 90
diff --git a/src/App.tsx b/src/App.tsx
index fbe4348..08b7f43 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,19 +1,19 @@
import {
- DEFAULT_THEME,
- MantineProvider,
colorsTuple,
createTheme,
+ DEFAULT_THEME,
+ MantineProvider,
mergeMantineTheme,
} from '@mantine/core';
import { Notifications } from '@mantine/notifications';
import { useCommonHooks, useQueryAPI } from 'hooks';
import { useEffect, useState } from 'react';
import {
+ createBrowserRouter,
+ createRoutesFromElements,
Navigate,
Route,
RouterProvider,
- createBrowserRouter,
- createRoutesFromElements,
} from 'react-router-dom';
import { Loading, MainLayout } from './components';
import '@mantine/core/styles.css';
diff --git a/src/Root.tsx b/src/Root.tsx
index bce7d5a..d7b8bf5 100644
--- a/src/Root.tsx
+++ b/src/Root.tsx
@@ -1,8 +1,8 @@
import { QueryClient } from '@tanstack/react-query';
import {
- PersistQueryClientProvider,
type PersistedClient,
type Persister,
+ PersistQueryClientProvider,
} from '@tanstack/react-query-persist-client';
import { del, get, set } from 'idb-keyval';
import React, { type ComponentType } from 'react';
diff --git a/src/components/WeatherModal/CurrentWeather.tsx b/src/components/WeatherModal/CurrentWeather.tsx
index e29cb87..5c4b9bb 100644
--- a/src/components/WeatherModal/CurrentWeather.tsx
+++ b/src/components/WeatherModal/CurrentWeather.tsx
@@ -32,7 +32,7 @@ export default function CurrentWeather({ current }: { current: CW }) {
}, [sunStateData]);
return (
<>
- {current ? (
+ {current && (
- ) : (
- <>>
)}
>
);
diff --git a/src/components/WeatherModal/ExtendedForecastCard.tsx b/src/components/WeatherModal/ExtendedForecastCard.tsx
index a832aeb..e7a07d1 100644
--- a/src/components/WeatherModal/ExtendedForecastCard.tsx
+++ b/src/components/WeatherModal/ExtendedForecastCard.tsx
@@ -6,7 +6,9 @@ import WeatherIcon from './WeatherIcon';
export default function ExtendedForecastCard({
forecast,
-}: { forecast: ExtendedForecast[] }) {
+}: {
+ forecast: ExtendedForecast[];
+}) {
const { isMobile } = useCommonHooks();
const day = forecast.slice(2, 14).filter((item: ExtendedForecast) => item.isDaytime);
const night = forecast.slice(2, 14).filter((item: ExtendedForecast) => !item.isDaytime);
diff --git a/src/components/WeatherModal/WeatherGraphs.tsx b/src/components/WeatherModal/WeatherGraphs.tsx
index a803890..83c2b92 100644
--- a/src/components/WeatherModal/WeatherGraphs.tsx
+++ b/src/components/WeatherModal/WeatherGraphs.tsx
@@ -1,4 +1,4 @@
-import { Stack, Text } from '@mantine/core';
+import { Stack } from '@mantine/core';
import {
Area,
AreaChart,
@@ -12,34 +12,15 @@ import {
YAxis,
} from 'recharts';
import type { HourlyForecast } from 'types';
+import WeatherTooltip from './WeatherTooltip';
export default function WeatherGraphs({
hourlyForecast,
-}: { hourlyForecast: HourlyForecast[] }) {
- function CustomTooltip({ payload, active }: any) {
- if (active) {
- return (
-
- {payload.map((item: any) => (
- {`${item.name} - ${item.value}${item.unit}`}
- ))}
-
- );
- }
-
- return null;
- }
-
+}: {
+ hourlyForecast: HourlyForecast[];
+}) {
+ const colorPrecipitation = 'colorPrecipitation';
+ const colorHumidity = 'colorHumidity';
return (
- } />
+ } />
-
+
-
+
- } />
+ } />
{
+ const lookupSource = (icon: any) => {
switch (icon.trim()) {
case 'Ash':
- return (
-
- );
+ return {
+ src: HazeIcon,
+ alt: 'HazeIcon',
+ };
case 'Broken Clouds':
- return (
-
- );
+ return {
+ src: PartlyCloudyIcon,
+ alt: 'PartlyCloudyIcon',
+ };
case 'Chance Rain Showers':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Chance Showers':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Slight Chance Showers':
- return (
-
- );
- case 'Clear':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Cloudy':
- return (
-
- );
+ return {
+ src: CloudyIcon,
+ alt: 'CloudyIcon',
+ };
case 'Dust':
- return (
-
- );
+ return {
+ src: HazeIcon,
+ alt: 'HazeIcon',
+ };
case 'Drizzle':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Fog':
- return (
-
- );
+ return {
+ src: HazeIcon,
+ alt: 'HazeIcon',
+ };
case 'Freezing Rain':
- return (
-
- );
+ return {
+ src: SleetIcon,
+ alt: 'SleetIcon',
+ };
case 'Haze':
- return (
-
- );
+ return {
+ src: HazeIcon,
+ alt: 'HazeIcon',
+ };
case 'Heavy Rain':
- return (
-
- );
+ return {
+ src: HeavyRainIcon,
+ alt: 'HeavyRainIcon',
+ };
case 'Heavy Snow':
- return (
-
- );
+ return {
+ src: SnowIcon,
+ alt: 'SnowIcon',
+ };
case 'Light Rain':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Mist':
- return (
-
- );
+ return {
+ src: HazeIcon,
+ alt: 'HazeIcon',
+ };
case 'Moderate Rain':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Mostly Cloudy':
- return (
-
- );
+ return {
+ src: CloudyIcon,
+ alt: 'CloudyIcon',
+ };
case 'Overcast Clouds':
- return (
-
- );
+ return {
+ src: PartlyCloudyIcon,
+ alt: 'PartlyCloudyIcon',
+ };
case 'Patchy Fog':
- return (
-
- );
+ return {
+ src: HazeIcon,
+ alt: 'HazeIcon',
+ };
case 'Partly Sunny':
- return (
-
- );
+ return {
+ src: PartlyCloudyIcon,
+ alt: 'PartlyCloudyIcon',
+ };
case 'Rain':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Scattered Clouds':
- return (
-
- );
+ return {
+ src: PartlyCloudyIcon,
+ alt: 'PartlyCloudyIcon',
+ };
case 'Showers':
- return (
-
- );
+ return {
+ src: RainIcon,
+ alt: 'RainIcon',
+ };
case 'Sleet':
- return (
-
- );
+ return {
+ src: SleetIcon,
+ alt: 'SleetIcon',
+ };
case 'Smoke':
- return (
-
- );
+ return {
+ src: HazeIcon,
+ alt: 'HazeIcon',
+ };
case 'Snow':
- return (
-
- );
+ return {
+ src: SnowIcon,
+ alt: 'SnowIcon',
+ };
case 'Squall':
- return (
-
- );
+ return {
+ src: WindyIcon,
+ alt: 'WindyIcon',
+ };
case 'Thunderstorm':
- return (
-
- );
+ return {
+ src: ThunderstormIcon,
+ alt: 'ThunderstormIcon',
+ };
case 'Tornado':
- return (
-
- );
+ return {
+ src: WindyIcon,
+ alt: 'WindyIcon',
+ };
default:
- return (
-
- );
+ return {
+ src: SunnyIcon,
+ alt: 'SunnyIcon',
+ };
}
};
- return ;
+ return (
+
+ );
}
diff --git a/src/components/WeatherModal/WeatherModal.tsx b/src/components/WeatherModal/WeatherModal.tsx
index 2d9df1c..9140f7b 100644
--- a/src/components/WeatherModal/WeatherModal.tsx
+++ b/src/components/WeatherModal/WeatherModal.tsx
@@ -1,8 +1,7 @@
import { Center, Group, Modal, Stack, Text } from '@mantine/core';
-import { modalClasses } from 'styles';
-
import { useCommonHooks, useWeatherAPI } from 'hooks';
import { useEffect, useState } from 'react';
+import { modalClasses } from 'styles';
import type { CurrentWeather as CW, ExtendedForecast, HourlyForecast } from 'types';
import CurrentWeather from './CurrentWeather';
diff --git a/src/components/WeatherModal/WeatherTooltip.tsx b/src/components/WeatherModal/WeatherTooltip.tsx
new file mode 100644
index 0000000..37a38f8
--- /dev/null
+++ b/src/components/WeatherModal/WeatherTooltip.tsx
@@ -0,0 +1,27 @@
+import { Stack, Text } from '@mantine/core';
+
+function WeatherTooltip({ payload, active }: any) {
+ if (active) {
+ return (
+
+ {payload.map((item: any) => (
+ {`${item.name} - ${item.value}${item.unit}`}
+ ))}
+
+ );
+ }
+
+ return null;
+}
+
+export default WeatherTooltip;
diff --git a/src/components/index.ts b/src/components/index.ts
index d66a9bd..8030da1 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -1,4 +1,4 @@
export { HelpModal } from './HelpModal/HelpModal';
-export { WeatherModal } from './WeatherModal/WeatherModal';
-export { MainLayout } from './MainLayout';
export { Loading } from './Loading';
+export { MainLayout } from './MainLayout';
+export { WeatherModal } from './WeatherModal/WeatherModal';
diff --git a/src/hooks/index.ts b/src/hooks/index.ts
index 0f784af..b2c65c1 100644
--- a/src/hooks/index.ts
+++ b/src/hooks/index.ts
@@ -1,7 +1,7 @@
export {
- useQueryAPI,
- useWeatherAPI,
useMutationAPI,
useOSMAPI,
+ useQueryAPI,
+ useWeatherAPI,
} from './useAPI';
export { useCommonHooks } from './useCommonHooks';
diff --git a/src/pages/homepage/components/Bookmarks/BookmarkGroups.tsx b/src/pages/homepage/components/Bookmarks/BookmarkGroups.tsx
index b516280..c37b9db 100644
--- a/src/pages/homepage/components/Bookmarks/BookmarkGroups.tsx
+++ b/src/pages/homepage/components/Bookmarks/BookmarkGroups.tsx
@@ -6,7 +6,10 @@ import BookmarkItem from './BookmarkItem';
function BookmarkGroups({
bookmarks,
category,
-}: { bookmarks: Bookmark[]; category: string }) {
+}: {
+ bookmarks: Bookmark[];
+ category: string;
+}) {
return (
{
- handleSearchHistoryItem(item);
- }}
- onMouseEnter={() => {
- setShowFillButton(true);
- }}
- onMouseLeave={() => {
- setShowFillButton(false);
- }}
- >
-
-
- {item.option.provider}
-
- {showFillButton && (
- {
- e.stopPropagation();
- setSearchValue(`${item.option.prefix} ${item.option.searchTerm}`);
- }}
- >
-
-
- )}
-
-
-
- {item.option.searchTerm}
-
-
- {dateString}
-
-
-
- {showFillButton && (
- {
- e.stopPropagation();
- mutateAsync({
- method: 'DELETE',
- endpoint: searchEndpoint,
- body: { id: item.option.id },
- });
- }}
- >
-
-
- )}
-
-
- );
- }
-
useEffect(() => {
if (providerData && providerDataIsFetched) {
setProviders(providerData);
@@ -460,7 +346,13 @@ export default function Search({
autoFocus={!isMobile}
leftSection={providerLabel}
rightSection={}
- renderOption={RenderOption}
+ renderOption={(item: any) => (
+
+ )}
onBlur={() => {
setPlaceholderValue('');
setListIndex(0);
diff --git a/src/pages/homepage/components/Search/SearchHistoryItem.tsx b/src/pages/homepage/components/Search/SearchHistoryItem.tsx
new file mode 100644
index 0000000..7637d52
--- /dev/null
+++ b/src/pages/homepage/components/Search/SearchHistoryItem.tsx
@@ -0,0 +1,115 @@
+import { ActionIcon, Group, Text } from '@mantine/core';
+import { useCommonHooks, useMutationAPI } from 'hooks';
+import { useState } from 'react';
+import { FiEdit, FiTrash } from 'react-icons/fi';
+import { actionIconClasses } from 'styles';
+
+function SearchSelectItem({ item, handleSearchHistoryItem, searchEndpoint }: any) {
+ const { isMobile, theme, setSearchValue } = useCommonHooks();
+ const { mutateAsync } = useMutationAPI();
+ const [showFillButton, setShowFillButton] = useState(false);
+ const m = new Date(item.option.dateTimeStamp);
+ const year = `${m.getUTCFullYear()}`.slice(-2);
+ const month = `0${m.getUTCMonth() + 1}`.slice(-2);
+ const day = `0${m.getUTCDate()}`.slice(-2);
+ const hours = `0${m.getUTCHours()}`.slice(-2);
+ const minutes = `0${m.getUTCMinutes()}`.slice(-2);
+ const dateString = isMobile
+ ? `${month}/${day}/${year}`
+ : `${month}/${day}/${year} ${hours}:${minutes}`;
+ return (
+ {
+ handleSearchHistoryItem(item);
+ }}
+ onMouseEnter={() => {
+ setShowFillButton(true);
+ }}
+ onMouseLeave={() => {
+ setShowFillButton(false);
+ }}
+ >
+
+
+ {item.option.provider}
+
+ {showFillButton && (
+ {
+ e.stopPropagation();
+ setSearchValue(`${item.option.prefix} ${item.option.searchTerm}`);
+ }}
+ >
+
+
+ )}
+
+
+
+ {item.option.searchTerm}
+
+
+ {dateString}
+
+
+
+ {showFillButton && (
+ {
+ e.stopPropagation();
+ mutateAsync({
+ method: 'DELETE',
+ endpoint: searchEndpoint,
+ body: { id: item.option.id },
+ });
+ }}
+ >
+
+
+ )}
+
+
+ );
+}
+
+export default SearchSelectItem;
diff --git a/src/pages/settings/components/Applications/DebouncedApplication.tsx b/src/pages/settings/components/Applications/DebouncedApplication.tsx
index 456579b..eefbdea 100644
--- a/src/pages/settings/components/Applications/DebouncedApplication.tsx
+++ b/src/pages/settings/components/Applications/DebouncedApplication.tsx
@@ -23,7 +23,11 @@ function DebouncedApplication({
application,
setIsOpen,
allIcons,
-}: { application: Application; setIsOpen: (isOpen: boolean) => void; allIcons: any }) {
+}: {
+ application: Application;
+ setIsOpen: (isOpen: boolean) => void;
+ allIcons: any;
+}) {
const { handleDelete, isMobile } = useCommonHooks();
const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false);
const { mutateAsync } = useMutationAPI();
diff --git a/src/pages/settings/components/Bookmarks/Bookmarks.tsx b/src/pages/settings/components/Bookmarks/Bookmarks.tsx
index e7db179..4baff03 100644
--- a/src/pages/settings/components/Bookmarks/Bookmarks.tsx
+++ b/src/pages/settings/components/Bookmarks/Bookmarks.tsx
@@ -10,6 +10,7 @@ import AddItemModal from '../Shared/AddItemModal';
import NoItemsFound from '../Shared/NoItemsFound';
import SettingsHeader from '../Shared/SettingsHeader';
import DebouncedGroupSettingsItem from './DebouncedGroupSettingsItem';
+
const BookmarkSettings = () => {
const defaultGroup = {
id: null,
diff --git a/src/pages/settings/components/Bookmarks/DebouncedBookmarkItem.tsx b/src/pages/settings/components/Bookmarks/DebouncedBookmarkItem.tsx
index 2969033..1384dbd 100644
--- a/src/pages/settings/components/Bookmarks/DebouncedBookmarkItem.tsx
+++ b/src/pages/settings/components/Bookmarks/DebouncedBookmarkItem.tsx
@@ -10,7 +10,10 @@ import DeleteItemModal from '../Shared/DeleteItemModal';
function DebouncedBookmarkItem({
bookmarkItem,
setIsOpen,
-}: { bookmarkItem: Bookmark; setIsOpen: (isOpen: boolean) => void }) {
+}: {
+ bookmarkItem: Bookmark;
+ setIsOpen: (isOpen: boolean) => void;
+}) {
const { handleDelete, isMobile } = useCommonHooks();
const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false);
const { mutateAsync } = useMutationAPI();
diff --git a/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx b/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx
index 5b616bc..6c2881d 100644
--- a/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx
+++ b/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx
@@ -33,7 +33,11 @@ function DebouncedGroupSettingsItem({
bookmarkGroup,
bookmarks,
searchTerm,
-}: { bookmarkGroup: BookmarkGroup; bookmarks: Bookmark[]; searchTerm: string }) {
+}: {
+ bookmarkGroup: BookmarkGroup;
+ bookmarks: Bookmark[];
+ searchTerm: string;
+}) {
const { isMobile, handleDelete, reorder } = useCommonHooks();
const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false);
const [popoverOpened, setPopoverOpened] = useState(false);
diff --git a/src/pages/settings/components/Personalization/Personalization.tsx b/src/pages/settings/components/Personalization/Personalization.tsx
index d7a7a91..0722a1c 100644
--- a/src/pages/settings/components/Personalization/Personalization.tsx
+++ b/src/pages/settings/components/Personalization/Personalization.tsx
@@ -5,6 +5,7 @@ import { useEffect, useState } from 'react';
import { cardClasses, textInputClasses } from 'styles';
import type { PersonalData } from 'types';
import SettingsHeader from '../Shared/SettingsHeader';
+
const PersonalizationSettings = () => {
const endpoint = 'api/personalData';
const {
diff --git a/src/pages/settings/components/Shared/SettingsHeader.tsx b/src/pages/settings/components/Shared/SettingsHeader.tsx
index 1095874..a32915e 100644
--- a/src/pages/settings/components/Shared/SettingsHeader.tsx
+++ b/src/pages/settings/components/Shared/SettingsHeader.tsx
@@ -11,7 +11,7 @@ import {
} from '@mantine/core';
import { useCommonHooks } from 'hooks';
import { useState } from 'react';
-import { FiHelpCircle, FiLoader, FiPlus } from 'react-icons/fi';
+import { FiHelpCircle, FiLoader, FiPlus, FiX } from 'react-icons/fi';
import {
actionIconClasses,
buttonClasses,
@@ -137,13 +137,23 @@ function SettingsHeader({
zIndex: 100,
}}
rightSection={
- isLoading && (
+ isLoading ? (
+ ) : (
+ searchValue && (
+ setSearchValue('')}
+ >
+
+
+ )
)
}
/>
diff --git a/src/pages/settings/components/Theming/ThemeExampleApp.tsx b/src/pages/settings/components/Theming/ThemeExampleApp.tsx
new file mode 100644
index 0000000..599c713
--- /dev/null
+++ b/src/pages/settings/components/Theming/ThemeExampleApp.tsx
@@ -0,0 +1,69 @@
+import { Box, Stack, Text } from '@mantine/core';
+import { useState } from 'react';
+import { FiCheck } from 'react-icons/fi';
+import { stackClasses } from 'styles';
+import type { Theme } from 'types';
+
+function ExampleApp({ selectedTheme }: { selectedTheme: Theme }) {
+ const [textDecoration, setTextDecoration] = useState('none');
+
+ return (
+ setTextDecoration('underline')}
+ onMouseOut={() => setTextDecoration('none')}
+ className={stackClasses.appItemBox}
+ >
+
+
+
+
+
+ {'Example App'}
+
+
+ {'https://www.example.com'}
+
+
+
+ );
+}
+
+export default ExampleApp;
diff --git a/src/pages/settings/components/Theming/ThemeMiniCard.tsx b/src/pages/settings/components/Theming/ThemeMiniCard.tsx
index 5076c97..5cd931c 100644
--- a/src/pages/settings/components/Theming/ThemeMiniCard.tsx
+++ b/src/pages/settings/components/Theming/ThemeMiniCard.tsx
@@ -1,12 +1,7 @@
import { Group, Text } from '@mantine/core';
import type { Theme } from 'types';
-function ThemeMiniCard({
- allThemes,
- item,
-}: {
- allThemes: Theme[];
- item: number;
-}) {
+
+function ThemeMiniCard({ allThemes, item }: { allThemes: Theme[]; item: number }) {
const theme = allThemes?.find((theme: Theme) => theme.id === item);
return (
@@ -19,9 +14,10 @@ function ThemeMiniCard({
w={'175px'}
h={'60px'}
style={{
- background: `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), no-repeat center url(/backgrounds/${theme?.backgroundImage})`,
+ backgroundImage: `linear-gradient(${theme?.backgroundColor}33, ${theme?.backgroundColor}33), url(/backgrounds/${theme?.backgroundImage})`,
backgroundSize: 'cover',
backgroundColor: theme?.backgroundColor,
+ backgroundPosition: 'center',
border: `solid ${theme?.borderColor}`,
borderRadius: '8px',
}}
diff --git a/src/pages/settings/components/Theming/ThemeModalContent.tsx b/src/pages/settings/components/Theming/ThemeModalContent.tsx
index 7467090..b419d1d 100644
--- a/src/pages/settings/components/Theming/ThemeModalContent.tsx
+++ b/src/pages/settings/components/Theming/ThemeModalContent.tsx
@@ -1,84 +1,22 @@
-import { Box, Group, Stack, Text } from '@mantine/core';
-import { useState } from 'react';
-import { FiCheck } from 'react-icons/fi';
-import { stackClasses } from 'styles';
+import { Group, Stack, Text } from '@mantine/core';
import type { Theme } from 'types';
+import ThemeExampleApp from './ThemeExampleApp';
export default function ThemeModalContent({ selectedTheme }: { selectedTheme: Theme }) {
- const ExampleApp = () => {
- const [textDecoration, setTextDecoration] = useState('none');
-
- return (
- setTextDecoration('underline')}
- onMouseOut={() => setTextDecoration('none')}
- className={stackClasses.appItemBox}
- >
-
-
-
-
-
- {'Example App'}
-
-
- {'https://www.example.com'}
-
-
-
- );
- };
return (
-
-
-
+
+
+
{
if (themePlaylistData && isThemePlaylistDataFetched) {
setThemePlaylists(
- themePlaylistData.filter((a: ThemePlaylist) =>
- a.name.toLowerCase().includes(debouncedSearch.toLowerCase()),
+ themePlaylistData.filter(
+ (a: ThemePlaylist) =>
+ a.name.toLowerCase().includes(debouncedSearch.toLowerCase()) ||
+ a.name.includes('Time of Day'),
),
);
}
@@ -95,7 +97,7 @@ function ThemePlaylists() {
isLoading={isLoading}
setIsLoading={setIsLoading}
/>
- {allThemeData ? (
+ {allThemeData && (
<>
>
- ) : (
- <>>
)}
diff --git a/src/pages/settings/components/Theming/Themes.tsx b/src/pages/settings/components/Theming/Themes.tsx
index 6ebbd07..77803ad 100644
--- a/src/pages/settings/components/Theming/Themes.tsx
+++ b/src/pages/settings/components/Theming/Themes.tsx
@@ -55,7 +55,6 @@ function ThemesSettings() {
currentThemePlaylist,
setCurrentThemePlaylist,
} = useCommonHooks();
-
const handleOpen = (theme: Theme) => {
setSelectedTheme(theme);
open();
@@ -267,7 +266,7 @@ function ThemesSettings() {
navigate(`/${import.meta.env.VITE_BASE_URL}/settings/themePlaylists`);
} else {
setCurrentThemePlaylist('All');
- setCurrentTheme('random');
+ setCurrentTheme(theme.name);
}
}}
>
diff --git a/src/types/index.ts b/src/types/index.ts
index b6eb175..88e9f9f 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -1,18 +1,18 @@
-export type {
- CurrentWeather,
- OutlookWeather,
- ExtendedForecast,
- HourlyForecast,
- SunState,
-} from './weather';
-export type { Application, AppCategory } from './application';
+export type { AppCategory, Application } from './application';
export type { Bookmark } from './bookmark';
export type { BookmarkGroup } from './bookmarkGroup';
-export type { PersonalData } from './personalData';
-export type { Message } from './message';
-export type { Provider } from './provider';
-export type { Theme, ThemePlaylist } from './theme';
-export type { WolClient } from './wolClient';
-export type { SearchHistoryItem, SearchShortcut } from './search';
-export type { User } from './user';
export type { Location } from './location';
+export type { Message } from './message';
+export type { PersonalData } from './personalData';
+export type { Provider } from './provider';
+export type { SearchHistoryItem, SearchShortcut } from './search';
+export type { Theme, ThemePlaylist } from './theme';
+export type { User } from './user';
+export type {
+ CurrentWeather,
+ ExtendedForecast,
+ HourlyForecast,
+ OutlookWeather,
+ SunState,
+} from './weather';
+export type { WolClient } from './wolClient';