Skip to content

Commit

Permalink
Merge pull request #1838 from statisticsnorway/MIMIR-1698_serverside_…
Browse files Browse the repository at this point in the history
…rendring_attachmentTableFigures

Mimir 1698 serverside rendring attachment table figures
  • Loading branch information
KyleDanny authored Apr 25, 2023
2 parents 87c5a6c + 137c4de commit e9f7c5d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion docs/PartRendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ return {
- [x] article
- [x] articleArchive
- [x] articleList
- [ ] attachmentTablesFigures
- [x] attachmentTablesFigures
- [x] bkibolCalculator
- [x] categoryLinks
- [x] contactForm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ export function preview(req: XP.Request): XP.Response {

function renderPart(req: XP.Request): XP.Response {
const page: Content<Statistics> = getContent()
// TODO Fjernet caching siden den skapte problemer for forhåndsvisning av upubliserte tall
// if (req.mode !== 'edit') {
// return fromPartCache(req, `${page._id}-attachmentTablesFigures`, () => {
// return getTablesAndFiguresComponent(page, req)
// })
// }
return getTablesAndFiguresComponent(page, req)
}

Expand Down Expand Up @@ -84,7 +78,6 @@ function getTablesAndFiguresComponent(page: Content<Statistics>, req: XP.Request
const accordionComponent: RenderResponse = r4XpRender('AttachmentTablesFigures', attachmentTablesFiguresProps, req, {
id: 'accordion',
body: `<section class="xp-part attachment-tables-figures"></section>`,
clientRender: req.mode !== 'edit',
})

const accordionBody: string | null = accordionComponent.body
Expand Down

0 comments on commit e9f7c5d

Please sign in to comment.