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

feat: add useLoginSettings hook [LIBS-516] #1354

Open
wants to merge 5 commits into
base: beta
Choose a base branch
from

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Aug 16, 2023

Implements LIBS-516

This runtime hook helps with building of custom login apps. See notes on dhis2/ui#1395 for more description of other changes needed / context of custom login apps.


Key features

  1. Adds hook useLoginSettings which populates public information related to login app settings from auth/loginConfig and locales/ui (note that these endpoints are not created/made public), so currently dummy values are just being populated.

Description

The hook useLoginSettings is added. This hook would only be populated for login app types, and hence depends on changes in app-platform.


Checklist

  • Have written Documentation
    • this is a draft PR for deciding how to structure login app. More documentation will be added if we actually implement this hook.
  • Has tests coverage
    • See above: tests will be implemented if we decide we want to implement this hook.

Known issues

  • note that endpoints have not been implemented, so the hook is just using dummy values for now.

Screenshots

n/a

@tomzemp tomzemp changed the base branch from alpha to beta August 22, 2023 08:07
@tomzemp tomzemp changed the base branch from beta to master August 25, 2023 11:06
@tomzemp tomzemp changed the base branch from master to beta August 25, 2023 11:06
data: dataLocales,
called: calledLocales,
error: errorLocales,
} = useDataQuery(queryLocales)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is a separate query because it does not need to be refetched

@tomzemp tomzemp marked this pull request as ready for review August 25, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant