diff --git a/components/Themes/Themes.tsx b/components/Themes/Themes.tsx
index ae41fcc..7130c66 100644
--- a/components/Themes/Themes.tsx
+++ b/components/Themes/Themes.tsx
@@ -168,93 +168,98 @@ const Themes = ({
- {theme === "Custom" && checkedThings.length > 0 ? (
-
-
-
- {checkedThings.map((filterId, index) => (
+ {theme === "Custom" && (
+ <>
+ {checkedThings.length > 0 ? (
+
+
+
+ {checkedThings.map((filterId, index) => (
+
+ ))}
+
+
+ updateSubjectColors(newColor)}
+ />
+
+
+
+ Hex
+
+
updateSubjectColors(newColor)}
+ />
+
+
+
+
+
+ Use setting
+
+
+
+ Opacity
+
+
- ))}
+
+ ) : (
- updateSubjectColors(newColor)}
- />
-
-
-
- Hex
-
-
updateSubjectColors(newColor)}
- />
+ {" "}
+ Select at least one subject.
-
-
-
-
- Use setting
-
-
-
- Opacity
-
-
+ )}
+ {checkedThings.length > 0 && (
-
-
- ) : (
-
- Select at
- least one subject.
-
- )}
-
- {checkedThings.length > 0 && (
-
+ )}
+ >
)}
>
);
diff --git a/data/filters.json b/data/filters.json
index cef5332..5d15d93 100644
--- a/data/filters.json
+++ b/data/filters.json
@@ -704,7 +704,7 @@
},
{
"id": 501,
- "name": "D",
+ "name": "Dissertação",
"groupId": 5,
"semester": 0,
"shifts": []
diff --git a/hooks/useColorTheme.ts b/hooks/useColorTheme.ts
index 77b5d68..58b112e 100644
--- a/hooks/useColorTheme.ts
+++ b/hooks/useColorTheme.ts
@@ -80,10 +80,8 @@ const fetchTheme = (
}
setTheme(themeLS);
- if (themeLS === "Custom") {
- opacityLS ? setOpacity(opacityLS === "true") : setOpacity(true);
- subjectColorsLS && setSubjectColors(subjectColorsLS);
- }
+ opacityLS ? setOpacity(opacityLS === "true") : setOpacity(true);
+ subjectColorsLS && setSubjectColors(subjectColorsLS);
};
function getDefaultColor(event: IFormatedShift | IEventDTO): string {
@@ -95,18 +93,6 @@ function getDefaultColor(event: IFormatedShift | IEventDTO): string {
}
}
-function getYearColor(event: IFormatedShift | IEventDTO, colors: string[]) {
- if ((event as IFormatedShift).id !== undefined) {
- return (
- colors[String((event as IFormatedShift).filterId)[0]] ??
- getDefaultColor(event)
- );
- }
- if ((event as IEventDTO).groupId !== undefined) {
- return colors[(event as IEventDTO).groupId] ?? getDefaultColor(event);
- }
-}
-
// note: returns the default color if it was not found in the subjectColors array
function getSubjectColor(
event: IFormatedShift | IEventDTO,