feat: main Renamed app folder to remix

This commit is contained in:
Nikolaj Frey 2023-06-27 10:50:29 +10:00
parent 993c88b3ef
commit 24615e5c33
17 changed files with 45 additions and 34 deletions

View File

@ -1,7 +1,7 @@
module.exports = {
apps: [
{
script: 'npm run app',
script: 'npm run remix',
name: 'tt',
namespace: 'thingtime'
}

View File

@ -4,12 +4,10 @@
"description": "Thing Time",
"main": "none",
"scripts": {
"app": "npm run dev --prefix app",
"app-https": "npm run https --prefix app",
"remix": "npm run dev --prefix remix",
"api": "npm run dev --prefix api",
"api-https": "npm run https --prefix api",
"build": "npm run build --prefix app",
"postinstall": "npm ci --prefix=app ; npm ci --prefix=api"
"build": "npm run build --prefix remix",
"postinstall": "npm ci --prefix remix ; npm ci --prefix=api"
},
"repository": {
"type": "git",

View File

View File

@ -1,6 +1,5 @@
import { ChakraProvider } from '@chakra-ui/react'
// import type { MetaFunction } from "@vercel/remix"
import type { MetaFunction } from '@remix-run/node'
import {
Links,
LiveReload,
@ -11,15 +10,9 @@ import {
} from '@remix-run/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 ({
children,
title = 'App title'
title = 'Thingtime | For Everything'
}: {
children: React.ReactNode
title?: string

View File

@ -2,33 +2,53 @@ import { Box, Flex, Text } from '@chakra-ui/react'
import React from 'react'
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 mainText = 'Thing Time'
// const mainText = 'Thing Time'
// const mainText = "Thingtime"
// const mainText = "thingtime"
const mainText = 'thingtime'
React.useEffect(() => {
const interval = setInterval(() => {
if (titleText === 'tt') {
setTitleText('tt.')
} else if (titleText === 'tt.') {
setTitleText('tt..')
} else if (titleText === 'tt..') {
setTitleText('tt...')
} else if (titleText === 'tt...') {
setTitleText(mainText)
} else if (titleText === mainText) {
if (!started) {
setStarted(true)
setTimeout(() => {
setTitleText('tt')
setStarted(false)
}, 15000)
}
}
const newTextIdx = texts?.indexOf(titleText) + 1
const newText = texts[newTextIdx] || texts[0]
setTitleText(newText)
// if (titleText === 'tt') {
// setTitleText('tt.')
// } else if (titleText === 'tt.') {
// setTitleText('tt..')
// } else if (titleText === 'tt..') {
// setTitleText('tt...')
// } else if (titleText === 'tt...') {
// setTitleText(mainText)
// } else if (titleText === mainText) {
// if (!started) {
// setStarted(true)
// setTimeout(() => {
// setTitleText('tt')
// setStarted(false)
// }, 15000)
// }
// }
}, 2000)
return () => clearInterval(interval)
}, [titleText, started])

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB