diff --git a/.eslintrc b/.eslintrc index 6040015b..6eaa7d75 100644 --- a/.eslintrc +++ b/.eslintrc @@ -32,6 +32,7 @@ "plugin:jsx-a11y/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", + "plugin:react/jsx-runtime", "prettier" ], "overrides": [ diff --git a/apps/mobile/App.tsx b/apps/mobile/App.tsx index 04b5b6f1..f3c73f69 100644 --- a/apps/mobile/App.tsx +++ b/apps/mobile/App.tsx @@ -2,9 +2,17 @@ /* eslint-disable import/namespace */ import 'expo-dev-client' -import React, { useState } from 'react' +import { useState } from 'react' -import { Code, Heading, Label, Paragraph, Shape } from '@status-im/components' +import { + Code, + Heading, + Image, + Label, + Paragraph, + Shape, + Sidebar, +} from '@status-im/components' import { Stack, TamaguiProvider } from '@tamagui/core' import { useFonts } from 'expo-font' import { SafeAreaView, TouchableOpacity } from 'react-native' @@ -29,6 +37,18 @@ export default function App() { return ( + + - Tamagui Example App + Status + @@ -41,4 +45,4 @@ function MyApp({ Component, pageProps }: AppProps) { // ) // } -export default MyApp +export default App diff --git a/apps/next/pages/_document.tsx b/apps/next/pages/_document.tsx index 19ecc65f..e27b9db0 100644 --- a/apps/next/pages/_document.tsx +++ b/apps/next/pages/_document.tsx @@ -1,27 +1,47 @@ import NextDocument, { Head, Html, Main, NextScript } from 'next/document' import { Children } from 'react' -// import { AppRegistry } from 'react-native' +import { AppRegistry } from 'react-native' import Tamagui from '../tamagui.config' +// TODO: the recommended approach breaks HMR when Tmaagui.getCSS() is called in the getInitialProps method. export default class Document extends NextDocument { - static async getInitialProps({ renderPage }: any) { - // AppRegistry.registerComponent('Main', () => Main) + // static async getInitialProps({ renderPage }: any) { + // AppRegistry.registerComponent('Main', () => Main) + // const page = await renderPage() + + // // @ts-ignore + // const { getStyleElement } = AppRegistry.getApplication('Main') + + // /** + // * Note: be sure to keep tamagui styles after react-native-web styles like it is here! + // * So Tamagui styles can override the react-native-web styles. + // */ + // const styles = [ + // getStyleElement(), + //