Skip to content

Latest commit

 

History

History
 
 

dynamic-website-popups

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Dynamic website notifications

A demo showcasing how dynamic notifications can be built on React and powered by Canonic as the Backend.

Screenshot

The text for the notification bar on the top is fetched dynamically from your Canonic project.

Links

Notification Types


Random Popup

Fetches a random popup from your project's database and displays it. All the logic is stored in your project's backend so it is not exposed to your users.

Popup Campaign

When we were doing #30DaysOfCanonic we used this on our website to keep our users up to date with what was going on. The popup changed daily linking to the content we published on that day.

Running the example


Frontend

The frontend is a simple create-react-app. After cloning, install the dependencies.

yarn install

Then start the dev server

yarn start

Backend

You can find the sample backend project canonic-dynamic-prompts here and clone it.

Screenshot

Copy the base url from the docs

Screenshot

Set the API_ROOT variable to the base url you just copied.

The example should now fetch data from the project you deployed.