0.3.6 • Published 4 years ago

tbc-common-footer v0.3.6

Weekly downloads
270
License
-
Repository
-
Last release
4 years ago

TBC Common React App Footer

Common footer for all Trinidad Benham React apps

Install

npm install --save tbc-common-footer

Component:

import CommonFooterContainer from "tbc-common-footer/dist/CommonFooterContainer";

<CommonFooterContainer verpath={verpath} />

Props

PropTypeRequiredDefaultDescription
verpathStringOptional"/"The absolute path to the version.txt file as accessed by the app. By default, if version.txt is created under the Public/ folder, it's root path will be domain/version.txt. However, in some instances this will not work, so this prop allows for specification of this file's path.

version.txt File

Any app importing the footer should have a version.txt in a public location (exact path defined in the verpath prop). If using simple routing (app is at root level of domain) then placing this file under public/ should be sufficient.

Example version.txt file:

2020.5.7.1234

Note: this file contains only the exact text that will be displayed in the footer version area

Required NPM Packages

npm install --save bootstrap

Testing

For any unit test file that deep renders ("mounts") this imported component, add the following:

jest.mock("tbc-common-footer/dist/CommonFooterContainer", () => "div");

Release Notes

  • 0.3.4: Added optional verpath prop used to specify absolute path of version.txt file; added error handling for missing version.txt file