Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ITG-97] Add, remove, create tags in task edit. #30

Merged
merged 5 commits into from
Apr 28, 2022
Merged

Conversation

gregori0o
Copy link
Contributor

@gregori0o gregori0o commented Apr 28, 2022

I have problem with Creatable component from react-select in file TagsEdit.tsx.

If I use commented code, functionality will work, but I have a lot error by problem with types. (I write this basis on examples in internet).
If I change code to meet with types, edit card won't work.

Creatable component
Some example

Edit: Solved

@gregori0o gregori0o marked this pull request as ready for review April 28, 2022 15:31
@gregori0o gregori0o self-assigned this Apr 28, 2022
Copy link
Contributor

@tgargula tgargula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only styling issues

cabra/src/api/tags.ts Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
cabra/src/pages/components/TagsEdit.tsx Outdated Show resolved Hide resolved
label: string;
}

const useTags = ({ tags, taskId }: Props) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌


const { data, isLoading, error } = useQuery(getTags.cacheKey, getTags.run);

const allTags = data?.data as ITag[];
Copy link
Contributor

@tgargula tgargula Apr 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const allTags = data?.data as ITag[];
const allTags = (data?.data || []) as ITag[];

Copy link
Contributor

@tgargula tgargula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 🔥🔥🔥🔥🔥
I left one comment

Copy link
Contributor

@koszar91 koszar91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's more beautiful: code or UI
Congratz!

@koszar91 koszar91 merged commit 0e0aa21 into develop Apr 28, 2022
@koszar91 koszar91 deleted the feature/ITG-97 branch April 28, 2022 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants