-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rowasc/bugfixes-offline-support
Offline support is fixed now for basic form fields.
- Loading branch information
Showing
3 changed files
with
107 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react' | ||
import NextHead from 'next/head' | ||
import { string } from 'prop-types' | ||
const defaultDescription = 'A standalone report submission tool for Ushahidi deployments.' | ||
const defaultOGURL = '' | ||
const defaultOGImage = 'https://www.ushahidi.com//uploads/about-images/ushahidi-stamp.png' | ||
|
||
const Head = props => ( | ||
<NextHead> | ||
<meta charSet="UTF-8" /> | ||
<title>{props.title || ''}</title> | ||
<meta | ||
name="description" | ||
content={props.description || defaultDescription} | ||
/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" sizes="192x192" href="/static/touch-icon.png" /> | ||
<link rel="apple-touch-icon" href="/static/touch-icon.png" /> | ||
<link rel="mask-icon" href="/static/favicon-mask.svg" color="#49B882" /> | ||
<link rel="icon" href="/static/favicon.ico" /> | ||
<meta property="og:url" content={props.url || defaultOGURL} /> | ||
<meta property="og:title" content={props.title || ''} /> | ||
<meta | ||
property="og:description" | ||
content={props.description || defaultDescription} | ||
/> | ||
<meta name="twitter:site" content={props.url || defaultOGURL} /> | ||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:image" content={props.ogImage || defaultOGImage} /> | ||
<meta property="og:image" content={props.ogImage || defaultOGImage} /> | ||
<meta property="og:image:width" content="1200" /> | ||
<meta property="og:image:height" content="630" /> | ||
</NextHead> | ||
) | ||
|
||
Head.propTypes = { | ||
title: string, | ||
description: string, | ||
url: string, | ||
ogImage: string | ||
} | ||
|
||
export default Head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import React from "react"; | ||
import Form from "../components/form"; | ||
import Head from "../components/head"; | ||
import "./index.css"; | ||
|
||
const Home = () => ( | ||
const Index = () => ( | ||
<div> | ||
|
||
<Head /> | ||
<Form /> | ||
</div> | ||
); | ||
export default Home; | ||
export default Index; |