Skip to content
Snippets Groups Projects
Commit f5b37161 authored by Julia Friesel's avatar Julia Friesel
Browse files

Merge branch '118-bug-export-is-missing-file-extension' into 'master'

Resolve "bug: export is missing file extension"

Closes #118

See merge request bloodyhealth/drip!47
parents 7ea6a683 1dd6649f
No related branches found
No related tags found
No related merge requests found
......@@ -2,28 +2,19 @@ import React, { Component } from 'react'
import {
View,
Button,
Text,
ScrollView,
Alert
} from 'react-native'
import Share from 'react-native-share'
import getDataAsCsvDataUri from '../lib/export-to-csv'
import styles from '../styles/index'
import { settings as labels } from './labels'
export default class Settings extends Component {
constructor(props) {
super(props)
this.state = {
pickerVisible: false
}
}
render() {
return (
<ScrollView>
<Text style={styles.welcome}>{this.state.welcomeText}</Text>
<View style={styles.homeButtons}>
<View style={styles.homeButton}>
<Button
......
......@@ -8,7 +8,8 @@ export default function makeDataURI() {
const csv = transformToCsv(cycleDaysSortedByDate)
const encoded = Base64.encodeURI(csv)
return `data:text/csv;base64,${encoded}`
// this is the MIME type android/libcore/MimeUtils expects, so we oblige
return `data:text/comma-separated-values;base64,${encoded}`
}
function transformToCsv(cycleDays) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment