tried to desactivate SSR without success and fixed chromacase logo in scaffold auth
This commit is contained in:
@@ -36,6 +36,7 @@ const ThemeProvider = ({ children }: { children: JSX.Element }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<NativeBaseProvider
|
<NativeBaseProvider
|
||||||
|
isSSR={false}
|
||||||
theme={extendTheme({
|
theme={extendTheme({
|
||||||
config: {
|
config: {
|
||||||
useSystemColorMode: false,
|
useSystemColorMode: false,
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ import LinkBase from './LinkBase';
|
|||||||
import { useDispatch } from '../../state/Store';
|
import { useDispatch } from '../../state/Store';
|
||||||
import { setAccessToken } from '../../state/UserSlice';
|
import { setAccessToken } from '../../state/UserSlice';
|
||||||
import useColorScheme from '../../hooks/colorScheme';
|
import useColorScheme from '../../hooks/colorScheme';
|
||||||
|
import { useAssets } from 'expo-asset';
|
||||||
|
|
||||||
const handleGuestLogin = async (apiSetter: (accessToken: string) => void): Promise<string> => {
|
const handleGuestLogin = async (apiSetter: (accessToken: string) => void): Promise<string> => {
|
||||||
const apiAccess = await API.createAndGetGuestAccount();
|
const apiAccess = await API.createAndGetGuestAccount();
|
||||||
apiSetter(apiAccess);
|
apiSetter(apiAccess);
|
||||||
return translate('loggedIn');
|
return translate('loggedIn');
|
||||||
};
|
};
|
||||||
import { useAssets } from 'expo-asset';
|
|
||||||
|
|
||||||
interface ScaffoldAuthProps {
|
interface ScaffoldAuthProps {
|
||||||
title: string;
|
title: string;
|
||||||
@@ -48,10 +48,11 @@ const ScaffoldAuth: FunctionComponent<ScaffoldAuthProps> = ({
|
|||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const colorScheme = useColorScheme();
|
const colorScheme = useColorScheme();
|
||||||
const logo =
|
const [logo] = useAssets(
|
||||||
colorScheme == 'light'
|
colorScheme == 'light'
|
||||||
? require('../../assets/icon_light.png')
|
? require('../../assets/icon_light.png')
|
||||||
: require('../../assets/icon_dark.png');
|
: require('../../assets/icon_dark.png')
|
||||||
|
);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const [banner] = useAssets(require('../../assets/banner.jpg'));
|
const [banner] = useAssets(require('../../assets/banner.jpg'));
|
||||||
|
|
||||||
@@ -69,14 +70,15 @@ const ScaffoldAuth: FunctionComponent<ScaffoldAuthProps> = ({
|
|||||||
<Column style={{ flex: 1 }}>
|
<Column style={{ flex: 1 }}>
|
||||||
<Wrap space={4} direction="row" style={{ padding: 16, paddingBottom: 0 }}>
|
<Wrap space={4} direction="row" style={{ padding: 16, paddingBottom: 0 }}>
|
||||||
<Row space={2} flex={1}>
|
<Row space={2} flex={1}>
|
||||||
{/* <Image
|
<Image
|
||||||
source={{ uri: logo }}
|
source={{ uri: logo?.at(0)?.uri }}
|
||||||
|
alt='Chromacase logo'
|
||||||
style={{
|
style={{
|
||||||
aspectRatio: 1,
|
aspectRatio: 1,
|
||||||
width: 32,
|
width: 32,
|
||||||
height: 32,
|
height: 32,
|
||||||
}}
|
}}
|
||||||
/> */}
|
/>
|
||||||
{layout.width > 650 && (
|
{layout.width > 650 && (
|
||||||
<Text fontSize={'xl'} selectable={false}>
|
<Text fontSize={'xl'} selectable={false}>
|
||||||
ChromaCase
|
ChromaCase
|
||||||
|
|||||||
Reference in New Issue
Block a user