Skip to content

Commit a967c95

Browse files
committed
feat: Add FormScreen and demo route
1 parent 6f1d955 commit a967c95

File tree

15 files changed

+47
-12
lines changed

15 files changed

+47
-12
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
2-
export { default } from '@app/core/routes/images/index'
2+
export { default } from '@app/core/routes/demos/forms/index'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
2+
export { default } from '@app/core/routes/demos/images/index'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
'use client'
2+
export { default } from '@app/core/routes/demos/forms/index'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
'use client'
2+
export { default } from '@app/core/routes/demos/images/index'

apps/next/app/(generated)/images/page.tsx

-2
This file was deleted.

apps/next/app/NextClientRootLayout.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client'
22
import React from 'react'
33
import UniversalAppProviders from '@app/screens/UniversalAppProviders'
4-
import { Image as NextContextImage } from '@green-stack/components/Image.next'
5-
import { Link as NextContextLink } from '@green-stack/navigation/Link.next'
4+
import { Image as NextContextImage } from '@green-stack/core/components/Image.next'
5+
import { Link as NextContextLink } from '@green-stack/core/navigation/Link.next'
66
import { useRouter as useNextContextRouter } from '@green-stack/navigation/useRouter.next'
77
import { useRouteParams as useNextRouteParams } from '@green-stack/navigation/useRouteParams.next'
88

features/@app-core/constants/testableFeatures.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
export const testableFeatures = [
33
{
44
title: 'Test Images?',
5-
link: '/images'
5+
link: '/demos/images'
6+
},
7+
{
8+
title: 'Test Forms?',
9+
link: '/demos/forms'
610
},
711
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { UniversalRouteScreen } from '@green-stack/core/navigation/UniversalRouteScreen'
2+
import FormsScreen from '../../../screens/FormsScreen'
3+
4+
/* --- /images --------------------------------------------------------------------------------- */
5+
6+
export default (props: any) => (
7+
<UniversalRouteScreen
8+
{...props}
9+
routeScreen={FormsScreen}
10+
/>
11+
)

features/@app-core/routes/images/index.tsx renamed to features/@app-core/routes/demos/images/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { UniversalRouteScreen } from '@green-stack/core/navigation/UniversalRouteScreen'
2-
import ImagesScreen from '../../screens/ImagesScreen'
2+
import ImagesScreen from '../../../screens/ImagesScreen'
33

44
/* --- /images --------------------------------------------------------------------------------- */
55

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
import { View, Text, Image } from '../components/styled'
3+
import BackButton from '../components/BackButton'
4+
5+
/* --- <FormsScreen/> ------------------------------------------------------------------------- */
6+
7+
const FormsScreen = () => (
8+
<View className="flex flex-1 justify-center items-center bg-slate-800">
9+
<BackButton backLink="/subpages/Universal%20Nav" />
10+
</View>
11+
)
12+
13+
/* --- Exports --------------------------------------------------------------------------------- */
14+
15+
export default FormsScreen

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"android": "npx turbo run android",
2626
"ios": "npx turbo run ios",
2727
"expo:web": "npx turbo run @app/expo#web",
28-
"build": "npx turbo run build",
28+
"build": "node -v && npx turbo run build",
2929
"build:schema": "npx turbo run @green-stack/core#build:schema",
3030
"check:workspaces": "npx turbo run @green-stack/core#check:workspaces",
3131
"check:workspaces:fix": "FIX_MODE=true npx turbo run @green-stack/core#check:workspaces",

packages/@green-stack-core/navigation/UniversalRouteScreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22
import { useQuery } from '@tanstack/react-query'
3-
import { type UniversalRouteProps, type QueryFn, DEFAULT_QUERY_BRIDGE } from './UniversalRouteScreen.helpers'
3+
import { UniversalRouteProps, QueryFn, DEFAULT_QUERY_BRIDGE } from './UniversalRouteScreen.helpers'
44
import { useRouteParams } from './useRouteParams'
55

66
/** --- <UniversalRouteScreen/> -------------------------------------------------------------------- */

packages/@green-stack-core/navigation/UniversalRouteScreen.web.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22
import { use, useState, useEffect } from 'react'
33
import { useQueryClient, useQuery, dehydrate, HydrationBoundary } from '@tanstack/react-query'
4-
import { type UniversalRouteProps, type QueryFn, DEFAULT_QUERY_BRIDGE } from './UniversalRouteScreen.helpers'
4+
import { UniversalRouteProps, QueryFn, DEFAULT_QUERY_BRIDGE } from './UniversalRouteScreen.helpers'
55
import { useRouteParams } from './useRouteParams'
66
import { isExpoWebLocal } from '../../../features/@app-core/appConfig'
77

packages/@green-stack-core/utils/tailwindUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ClassValue, clsx } from 'clsx'
1+
import { ClassValue, clsx } from 'clsx'
22
import { twMerge } from 'tailwind-merge'
33

44
/** --- cn() ----------------------------------------------------------------------------------- */

packages/@registries/routeManifest.generated.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
22
export const routeManifest = {
3-
['/images']: 'ImagesScreen',
3+
['/demos/forms']: 'FormsScreen',
4+
['/demos/images']: 'ImagesScreen',
45
['/']: 'HomeScreen',
56
['/subpages/[slug]']: 'SlugScreen',
67
} as const

0 commit comments

Comments
 (0)