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

Fetches config from backend in stead of config. #1568

Merged
merged 6 commits into from
Nov 13, 2023

Conversation

gunnarvelle
Copy link
Member

@gunnarvelle gunnarvelle commented Nov 10, 2023

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).

@gunnarvelle gunnarvelle requested a review from a team November 10, 2023 11:26
@gunnarvelle
Copy link
Member Author

gunnarvelle commented Nov 12, 2023

Det ser ut som om skrivelåsinga heller ikkje fungerer i frontend. Eg har satt MY_NDLA_WRITE_RESTRICTED i test men det vises ingenting på min ndla om dette sjølv om det skal vises på sida. Var innlogga som lærer så det var derfor det ikkje viser.

@gunnarvelle gunnarvelle marked this pull request as ready for review November 13, 2023 06:29
@gunnarvelle gunnarvelle requested a review from a team November 13, 2023 10:39
Copy link
Contributor

@Jonas-C Jonas-C left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -147,6 +148,11 @@ const MyNdlaPage = () => {

const aiLang = i18n.language === 'nn' ? 'nn' : '';

const allowedAiOrgs = useMemo(() => {
if (!aiData?.aiEnabledOrgs?.value) return [];
return aiData?.aiEnabledOrgs?.value;
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Sant nok.

@gunnarvelle gunnarvelle merged commit 244f8bd into master Nov 13, 2023
3 checks passed
@gunnarvelle gunnarvelle deleted the fetch-ai-config-backend branch November 13, 2023 12:50
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.

2 participants