Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: change group indicator title based on selected group

thecodrr3542b01e344e
diff --git a/apps/web/src/components/group-header/index.js b/apps/web/src/components/group-header/index.js
index 45da527c6..39f4c90c0 100644
--- a/apps/web/src/components/group-header/index.js
+++ b/apps/web/src/components/group-header/index.js
@@ -12,6 +12,10 @@ const groups = [
{ type: "month", title: "Month" },
];
+function getGroupTitleByType(type) {
+ return groups.find((v) => v.type === type).title;
+}
+
function GroupHeader(props) {
const { title, onExpand, isExpanded } = props;
const [selectedGroup, setSelectedGroup] = usePersistentState(
@@ -47,7 +51,7 @@ function GroupHeader(props) {
{title}
</Text>
<IconButton
- text="Default"
+ text={getGroupTitleByType(selectedGroup)}
icon={
isExpanded ? (
<Icon.ChevronUp size={18} />