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

Zvazit vytvorenie hooku/context provideru pre myprofile #181

Open
michalmasrna1 opened this issue Nov 11, 2023 · 0 comments · May be fixed by #554
Open

Zvazit vytvorenie hooku/context provideru pre myprofile #181

michalmasrna1 opened this issue Nov 11, 2023 · 0 comments · May be fixed by #554
Assignees
Labels
good first issue Good for newcomers quick win refactor nie je potrebne ale chceme to spravit
Milestone

Comments

@michalmasrna1
Copy link
Contributor

michalmasrna1 commented Nov 11, 2023

EDIT od Risa:
context zbytocne, ale extrahovat nieco taketo je v pohode:

export const useProfile = () => {
  const {isAuthed} = AuthContainer.useContainer()

  const {data, isLoading} = useQuery({
    queryKey: ['personal', 'profiles', 'myprofile'],
    queryFn: () => axios.get<Profile>(`/api/personal/profiles/myprofile`),
    enabled: isAuthed,
  })
  const profile = data?.data

  return {profile, isLoading}
}
@michalmasrna1 michalmasrna1 added this to the 1.1 milestone Nov 11, 2023
@rtrembecky rtrembecky added the good first issue Good for newcomers label Nov 11, 2023
@Matushl Matushl added the refactor nie je potrebne ale chceme to spravit label Dec 9, 2023
@Matushl Matushl modified the milestones: 1.1, 2.0 Dec 9, 2023
@Matushl Matushl modified the milestones: 2.0, 3.0 Apr 13, 2024
@Matushl Matushl modified the milestones: 3.0, 4.0 Dec 15, 2024
@rtrembecky rtrembecky self-assigned this Dec 17, 2024
rtrembecky added a commit that referenced this issue Dec 17, 2024
@rtrembecky rtrembecky linked a pull request Dec 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers quick win refactor nie je potrebne ale chceme to spravit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants