-
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
Legger til støtte for nye læringssti steg. #2323
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
46c3e71
to
2b6cf4d
Compare
2b6cf4d
to
23d0ac2
Compare
const learningpathStepResource = learningpathStep.resource ?? data; | ||
const resource = learningpathStep.resource ?? data?.node; |
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.
Ser det er en del håndtering av at learningPathStep.resource kan være undefined i denne filen, men det kan vel fjernes ettersom du allerede sjekker for undefined i LearningpathStep
? eller er det stress å få til med gql typene?
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.
Det er litt stress samt. dette er egentlig bare kopiert over fra den svære LearningpathEmbed
fila. Litt redd for å tulle med noe 🤠
src/components/Learningpath/components/LearningpathStepTitle.tsx
Outdated
Show resolved
Hide resolved
1c73441
to
de47ee3
Compare
fbbefa1
to
1c989d1
Compare
Ikke direkte relatert til denne, så det kan sikkert gjøres i egen PR, men vi burde kanskje sjekke at url er på riktig format før vi sender av gårde requesten i formen for å legge til innhold fra et annet nettsted? Får veldig mange "Invalid URL"- feil fra gql hvis man prøver å skrive noe i input-feltet |
En annen litt rar greie som heller ikke er direkte relatert til denne: hvis man legger til artikkel fra NDLA for så å slette den igjen får man mulighet til å lagre steget, det burde vel være disablet! |
depends on NDLANO/graphql-api#539
Legger til støtte for nye typer læringssti steg og splitter opp renderingen i flere filer for å letter se forskjellen.