diff --git a/packages/cra-template/template/public/favicon.ico b/packages/cra-template/template/public/favicon.ico new file mode 100644 index 0000000000..a11777cc47 Binary files /dev/null and b/packages/cra-template/template/public/favicon.ico differ diff --git a/packages/cra-template/template/public/manifest.json b/packages/cra-template/template/public/manifest.json new file mode 100644 index 0000000000..fdd266cb19 --- /dev/null +++ b/packages/cra-template/template/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Coveo Search Page Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/packages/cra-template/template/src/App.tsx b/packages/cra-template/template/src/App.tsx index 2a24eed915..c9f9d14e2e 100644 --- a/packages/cra-template/template/src/App.tsx +++ b/packages/cra-template/template/src/App.tsx @@ -62,7 +62,12 @@ const Home = () => { const Error = () => { return ( - +
diff --git a/packages/cra-template/template/src/Components/Hero.tsx b/packages/cra-template/template/src/Components/Hero.tsx index 52e1355bb7..cd9c07a13d 100644 --- a/packages/cra-template/template/src/Components/Hero.tsx +++ b/packages/cra-template/template/src/Components/Hero.tsx @@ -15,8 +15,13 @@ const Hero: React.FunctionComponent = (props) => { return (
- {props.logos.map((logo) => ( - logo + {props.logos.map((logo, idx) => ( + logo ))} @@ -62,16 +67,16 @@ const Hero: React.FunctionComponent = (props) => { Essential Links
    -
  • +
  • -
  • +
  • -
  • +
  • = (props) => { const [state, setState] = useState(controller.state); useEffect( - () => controller.subscribe(() => setState(controller.state)), + () => + controller.subscribe(() => + setTimeout(() => setState(controller.state), 0) + ), [controller] ); diff --git a/packages/cra-template/template/src/Components/SearchPage.tsx b/packages/cra-template/template/src/Components/SearchPage.tsx index 3a539bcbe9..6fb46c5531 100644 --- a/packages/cra-template/template/src/Components/SearchPage.tsx +++ b/packages/cra-template/template/src/Components/SearchPage.tsx @@ -25,7 +25,7 @@ const SearchPage: React.FunctionComponent = (props) => { return ( - + diff --git a/packages/cra-template/template/src/theme.tsx b/packages/cra-template/template/src/theme.tsx index bcebbd937d..ce9b016d83 100644 --- a/packages/cra-template/template/src/theme.tsx +++ b/packages/cra-template/template/src/theme.tsx @@ -1,8 +1,8 @@ import red from '@material-ui/core/colors/red'; -import {createMuiTheme} from '@material-ui/core/styles'; +import {createTheme} from '@material-ui/core/styles'; // A custom theme for this app -const theme = createMuiTheme({ +const theme = createTheme({ palette: { type: 'light', text: {