Change tags to use uids instead of ids. (#351)

* Small cleanups

* Change tags to use uid instead of id.

---------

Co-authored-by: antanst <>
This commit is contained in:
Antonis 2025-09-22 17:10:29 +03:00 committed by GitHub
parent 8b01e456b3
commit 70956f9ecd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 97 additions and 133 deletions

View file

@ -288,15 +288,15 @@ const Layout: React.FC<LayoutProps> = ({
const handleSaveTag = async (tagData: Tag) => {
try {
let result: Tag;
if (tagData.id) {
result = await updateTag(tagData.id, tagData);
if (tagData.uid) {
result = await updateTag(tagData.uid, tagData);
// Update existing tag in global store
const currentTags = useStore.getState().tagsStore.tags;
useStore
.getState()
.tagsStore.setTags(
currentTags.map((tag) =>
tag.id === result.id ? result : tag
tag.uid === result.uid ? result : tag
)
);
} else {