-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fetches config from backend in stead of config. #1568
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/containers/MyNdla/MyNdlaPage.tsx
Outdated
@@ -147,6 +148,11 @@ const MyNdlaPage = () => { | |||
|
|||
const aiLang = i18n.language === 'nn' ? 'nn' : ''; | |||
|
|||
const allowedAiOrgs = useMemo(() => { | |||
if (!aiData?.aiEnabledOrgs?.value) return []; | |||
return aiData?.aiEnabledOrgs?.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trenger vel ikke noe spørsmålstegn på siste her
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sant nok.
Depends on NDLANO/backend#333 and NDLANO/graphql-api/
Får henta config fra backend men det funker ikkje å lese det ut fra value-feltet. Aner ikkje kvifor og finn ikkje ut av det.Kun eg som ikkje kan kode.
Test:
Kjør lokalt (fordi vercel ikkje funker med feide) og logg inn som frank_foreleser. Du skal få opp kampanjeblokk. Andre brukere skal ikkje få (om dei ikkje er i Universitetet i Rogn).