Skip to content

Commit

Permalink
Added react-native-web capability
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardKrupa-Cap committed Jun 30, 2023
1 parent b3a3740 commit 46dfb10
Show file tree
Hide file tree
Showing 8 changed files with 7,676 additions and 1,966 deletions.
2 changes: 1 addition & 1 deletion components/FeatureButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Text, StyleSheet, Pressable} from 'react-native';
import React from 'react';
import {SharedStyles, colours, vh} from '../components/SharedStyles';
import {SharedStyles, colours, vh, vw} from '../components/SharedStyles';

const styles = StyleSheet.create({
button: {
Expand Down
2 changes: 1 addition & 1 deletion components/StandardFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Image, StyleSheet, Text, View} from 'react-native';
import React from 'react';
import {colours, vh, vw} from './SharedStyles';

const logo = require('../assets/cat-logo.png');
import logo from '../assets/cat-logo.png';

const styles = StyleSheet.create({
footer: {
Expand Down
2 changes: 1 addition & 1 deletion components/StandardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Image, StyleSheet, Text, View} from 'react-native';
import React from 'react';
import {colours, vh, vw} from '../components/SharedStyles';

const logo = require('../assets/cat-logo.png');
import logo from '../assets/cat-logo.png';

const styles = StyleSheet.create({
header: {
Expand Down
19 changes: 19 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>RN Web</title>
<style>
#app-root {
display: flex;
flex: 1 1 100%;
height: 100vh;
}
</style>
</head>
<body>
<div id="app-root"></div>
</body>
</html>
10 changes: 10 additions & 0 deletions index.web.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {AppRegistry} from 'react-native';
import App from './App';
if (module.hot) {
module.hot.accept();
}
AppRegistry.registerComponent('React Native Web', () => App);
AppRegistry.runApplication('React Native Web', {
initialProps: {},
rootTag: document.getElementById('app-root'),
});
Loading

0 comments on commit 46dfb10

Please sign in to comment.