CodeForAfrica / CodeForAfrica/ui

Fix CivicSignal Research blog Live-previews

Open
#998 0 comments 0 reactions 1 assignee Claimed by @m453h View on GitHub
bug enhancement
Dominant language
JavaScript
Stars
3
Forks
2
Avg merge
3d 1h
Merged PRs (30d)
5

Description

**Describe the bug**
Currently live-previews are not working for components that require pre-processing on `getServerSideProps`. We need to find a proper way to fix this issue. Two proposed solutions are:

1. Refractor the [blockify](https://github.com/CodeForAfrica/ui/blob/main/apps/civicsignalblog/src/lib/data/blockify/index.js) to make it callable on both client-side and server-side.

2. Use payload's [afterRead](https://payloadcms.com/docs/hooks/collections#afterread) hook to handle all the data transformation i.e. move the call of the blockify function in this hook .

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.