feat: main Renamed app folder to remix
This commit is contained in:
parent
993c88b3ef
commit
24615e5c33
@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
apps: [
|
apps: [
|
||||||
{
|
{
|
||||||
script: 'npm run app',
|
script: 'npm run remix',
|
||||||
name: 'tt',
|
name: 'tt',
|
||||||
namespace: 'thingtime'
|
namespace: 'thingtime'
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,10 @@
|
|||||||
"description": "Thing Time",
|
"description": "Thing Time",
|
||||||
"main": "none",
|
"main": "none",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"app": "npm run dev --prefix app",
|
"remix": "npm run dev --prefix remix",
|
||||||
"app-https": "npm run https --prefix app",
|
|
||||||
"api": "npm run dev --prefix api",
|
"api": "npm run dev --prefix api",
|
||||||
"api-https": "npm run https --prefix api",
|
"build": "npm run build --prefix remix",
|
||||||
"build": "npm run build --prefix app",
|
"postinstall": "npm ci --prefix remix ; npm ci --prefix=api"
|
||||||
"postinstall": "npm ci --prefix=app ; npm ci --prefix=api"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
0
app/.gitignore → remix/.gitignore
vendored
0
app/.gitignore → remix/.gitignore
vendored
@ -1,6 +1,5 @@
|
|||||||
import { ChakraProvider } from '@chakra-ui/react'
|
import { ChakraProvider } from '@chakra-ui/react'
|
||||||
// import type { MetaFunction } from "@vercel/remix"
|
// import type { MetaFunction } from "@vercel/remix"
|
||||||
import type { MetaFunction } from '@remix-run/node'
|
|
||||||
import {
|
import {
|
||||||
Links,
|
Links,
|
||||||
LiveReload,
|
LiveReload,
|
||||||
@ -11,15 +10,9 @@ import {
|
|||||||
} from '@remix-run/react'
|
} from '@remix-run/react'
|
||||||
import { Analytics } from '@vercel/analytics/react'
|
import { Analytics } from '@vercel/analytics/react'
|
||||||
|
|
||||||
export const meta: MetaFunction = () => ({
|
|
||||||
charset: 'utf-8',
|
|
||||||
title: 'Thingtime | For Everything',
|
|
||||||
viewport: 'width=device-width,initial-scale=1'
|
|
||||||
})
|
|
||||||
|
|
||||||
function Document ({
|
function Document ({
|
||||||
children,
|
children,
|
||||||
title = 'App title'
|
title = 'Thingtime | For Everything'
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
title?: string
|
title?: string
|
@ -2,33 +2,53 @@ import { Box, Flex, Text } from '@chakra-ui/react'
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
export default function Index () {
|
export default function Index () {
|
||||||
const [titleText, setTitleText] = React.useState('tt')
|
const texts = [
|
||||||
|
// 't',
|
||||||
|
'tt',
|
||||||
|
'/',
|
||||||
|
'thingtime'
|
||||||
|
// 'tht',
|
||||||
|
// 'thit',
|
||||||
|
// 'thint',
|
||||||
|
// 'thingt',
|
||||||
|
// 'thingti',
|
||||||
|
// 'thingtim',
|
||||||
|
// 'thingtime',
|
||||||
|
// 'Thingtime',
|
||||||
|
// 'ThingTime',
|
||||||
|
// 'Thing Time'
|
||||||
|
]
|
||||||
|
|
||||||
|
const [titleText, setTitleText] = React.useState(texts[0])
|
||||||
|
|
||||||
const [started, setStarted] = React.useState(false)
|
const [started, setStarted] = React.useState(false)
|
||||||
|
|
||||||
const mainText = 'Thing Time'
|
// const mainText = 'Thing Time'
|
||||||
// const mainText = "Thingtime"
|
// const mainText = "Thingtime"
|
||||||
// const mainText = "thingtime"
|
const mainText = 'thingtime'
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
if (titleText === 'tt') {
|
const newTextIdx = texts?.indexOf(titleText) + 1
|
||||||
setTitleText('tt.')
|
const newText = texts[newTextIdx] || texts[0]
|
||||||
} else if (titleText === 'tt.') {
|
setTitleText(newText)
|
||||||
setTitleText('tt..')
|
// if (titleText === 'tt') {
|
||||||
} else if (titleText === 'tt..') {
|
// setTitleText('tt.')
|
||||||
setTitleText('tt...')
|
// } else if (titleText === 'tt.') {
|
||||||
} else if (titleText === 'tt...') {
|
// setTitleText('tt..')
|
||||||
setTitleText(mainText)
|
// } else if (titleText === 'tt..') {
|
||||||
} else if (titleText === mainText) {
|
// setTitleText('tt...')
|
||||||
if (!started) {
|
// } else if (titleText === 'tt...') {
|
||||||
setStarted(true)
|
// setTitleText(mainText)
|
||||||
setTimeout(() => {
|
// } else if (titleText === mainText) {
|
||||||
setTitleText('tt')
|
// if (!started) {
|
||||||
setStarted(false)
|
// setStarted(true)
|
||||||
}, 15000)
|
// setTimeout(() => {
|
||||||
}
|
// setTitleText('tt')
|
||||||
}
|
// setStarted(false)
|
||||||
|
// }, 15000)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}, 2000)
|
}, 2000)
|
||||||
return () => clearInterval(interval)
|
return () => clearInterval(interval)
|
||||||
}, [titleText, started])
|
}, [titleText, started])
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue
Block a user