diff --git a/ecosystem.config.js b/ecosystem.config.js index ceae8d4..a9a060d 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -1,7 +1,7 @@ module.exports = { apps: [ { - script: 'npm run app', + script: 'npm run remix', name: 'tt', namespace: 'thingtime' } diff --git a/package.json b/package.json index 1e836a7..184bd3d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/app/.eslintrc.js b/remix/.eslintrc.js similarity index 100% rename from app/.eslintrc.js rename to remix/.eslintrc.js diff --git a/app/.gitignore b/remix/.gitignore similarity index 100% rename from app/.gitignore rename to remix/.gitignore diff --git a/app/README.md b/remix/README.md similarity index 100% rename from app/README.md rename to remix/README.md diff --git a/app/app/entry.client.tsx b/remix/app/entry.client.tsx similarity index 100% rename from app/app/entry.client.tsx rename to remix/app/entry.client.tsx diff --git a/app/app/entry.server.tsx b/remix/app/entry.server.tsx similarity index 100% rename from app/app/entry.server.tsx rename to remix/app/entry.server.tsx diff --git a/app/app/root.tsx b/remix/app/root.tsx similarity index 77% rename from app/app/root.tsx rename to remix/app/root.tsx index 9df3eae..f33fb98 100644 --- a/app/app/root.tsx +++ b/remix/app/root.tsx @@ -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 diff --git a/app/app/routes/edge.tsx b/remix/app/routes/edge.tsx similarity index 100% rename from app/app/routes/edge.tsx rename to remix/app/routes/edge.tsx diff --git a/app/app/routes/index.tsx b/remix/app/routes/index.tsx similarity index 50% rename from app/app/routes/index.tsx rename to remix/app/routes/index.tsx index 6002c44..ea1ffc2 100644 --- a/app/app/routes/index.tsx +++ b/remix/app/routes/index.tsx @@ -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]) diff --git a/app/package.json b/remix/package.json similarity index 100% rename from app/package.json rename to remix/package.json diff --git a/app/pnpm-lock.yaml b/remix/pnpm-lock.yaml similarity index 100% rename from app/pnpm-lock.yaml rename to remix/pnpm-lock.yaml diff --git a/app/public/favicon.ico b/remix/public/favicon.ico similarity index 100% rename from app/public/favicon.ico rename to remix/public/favicon.ico diff --git a/app/remix.config.js b/remix/remix.config.js similarity index 100% rename from app/remix.config.js rename to remix/remix.config.js diff --git a/app/remix.env.d.ts b/remix/remix.env.d.ts similarity index 100% rename from app/remix.env.d.ts rename to remix/remix.env.d.ts diff --git a/app/tsconfig.json b/remix/tsconfig.json similarity index 100% rename from app/tsconfig.json rename to remix/tsconfig.json diff --git a/app/vercel.json b/remix/vercel.json similarity index 100% rename from app/vercel.json rename to remix/vercel.json