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
export const uploadFile = async ( | |
record: Record, | |
date: string, | |
description: string, | |
recordId?: string | |
) => { | |
var headers = await defaultHeaders(); | |
headers["Content-Type"] = "multipart/form-data"; | |
const realPath = |
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
export const downloadFile = async (file: GenericFile) => { | |
const signalError = () => { | |
showMessage(i18n.t('file_download_failed'), colors.RED); | |
}; | |
const signalSuccess = () => { | |
showMessage(i18n.t('file_download_success'), colors.GREEN); | |
}; | |
const downloadUrl = await buildDownloadUrl(file); |
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
import PushNotificationIOS from '@react-native-community/push-notification-ios'; | |
import { Platform } from 'react-native'; | |
import PushNotification from 'react-native-push-notification'; | |
class NotificationManager { | |
configure = () => { | |
PushNotification.configure({ | |
onRegister: function (token: any) { | |
console.log('TOKEN:', token); | |
}, |
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
/** | |
* @format | |
*/ | |
import PushNotificationIOS from '@react-native-community/push-notification-ios'; | |
import { AppRegistry } from 'react-native'; | |
import PushNotification from 'react-native-push-notification'; | |
import App from './App'; | |
import { name as appName } from './app.json'; |
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
// ... | |
export const Layout = () => { | |
// will be true on all devices smaller than a desktop | |
const isDesktopOrUp = useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')); | |
return <Grid container direction="column"> | |
<Header /> | |
<Content /> | |
// the bottom navigation will be visible on tablets and mobile phones |
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
import React from 'react'; | |
import * as routes from '../routes'; | |
import { Route, Switch } from 'react-router-dom'; | |
export const Content = () => { | |
return ( | |
<Switch> | |
<Route exact path={routes.home} component={HomePage}/ | |
<Route exact path={routes.spaceships} component={SpaceshipsPage} /> | |
<Route exact path={routes.planets} component={PlanetsPage} / |
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
<Hidden lgUp> | |
<BottomNavigationMenu /> | |
</Hidden> |
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
<Hidden smDown lgUp> | |
// ... | |
</Hidden> |
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
import { | |
BottomNavigation, | |
BottomNavigationAction, | |
Hidden, | |
} from '@material-ui/core'; | |
import Drawer from '../../../../src/app/Drawer'; | |
import * as routes from '../../../app/routes'; | |
import { useTranslation } from 'react-i18next'; | |
import { useStyles } from './styles'; | |
import { useHistory } from 'react-router-dom'; |
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
import { makeStyles } from '@material-ui/core'; | |
export const useStyles = makeStyles((theme) => ({ | |
bottomNavigation: { | |
position: 'sticky', | |
paddingLeft: 16, | |
paddingRight: 16, | |
bottom: 0, | |
// ... | |
} |
OlderNewer