Skip to content

Commit

Permalink
🔥 reuse description from constants, rename plural Favicons
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-unterberg committed Jul 20, 2024
1 parent aaf70a4 commit 852e5be
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,6 @@ Additionally, we must clear all events on the transport and re-register them if
- Create an effect bus and display it on one of these pages
- Create event bus, where events are automatically re-scheduled after transport time has changed
- Add UI to clear metronome events
- explain framwork-meta-header -> `HeadDefault.tsx`
6 changes: 2 additions & 4 deletions components/TonePortalContent.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import Button from '#components/common/Button'
import H2Headline from '#components/common/H2Headline'
import { APP_CONFIG } from '#lib/constants'

const TonePortalContent = ({ handleClick }: { handleClick: () => void }) => (
<div className="flex justify-center">
<div className="mt-16 p-3">
<div className="text-5xl text-center mb-6">🚂🚃</div>
<H2Headline className="text-4xl text-center font-black mb-6">STATETRAIN</H2Headline>
<p className="text-xl md:w-3/4 mx-auto mb-5 text-center">
Gain control of the tone.js transport with a modern routable typescript-react environment.
🚂🚃
</p>
<p className="text-xl md:w-3/4 mx-auto mb-5 text-center">{APP_CONFIG.description}</p>
<Button className="bg-successDark text-white w-full justify-center" onClick={handleClick}>
Initialize Tone.js *
</Button>
Expand Down
2 changes: 2 additions & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export const APP_CONFIG = {
viteUrl: `${
import.meta.env.PROD ? 'https://richard-unterberg.github.io' : 'http://localhost:5247'
}${import.meta.env.BASE_URL.slice(0, -1)}`,
description:
'Gain control of the tone.js transport in a modern routable typescript-react environment. 🚂🚃',
}

export const TRANSPORT_CONFIG: TransportConfigType = {
Expand Down
4 changes: 2 additions & 2 deletions pages/Favicon.tsx → pages/Favicons.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { APP_CONFIG } from '#lib/constants'

const Favicon = () => (
const Favicons = () => (
<>
<meta
name="msapplication-TileImage"
Expand Down Expand Up @@ -79,4 +79,4 @@ const Favicon = () => (
</>
)

export default Favicon
export default Favicons
9 changes: 3 additions & 6 deletions pages/HeadDefault.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { APP_CONFIG } from '#lib/constants'
import Favicon from '#pages/Favicon'
import Favicons from '#pages/Favicons'

const Head = () => (
<>
<Favicon />
<Favicons />
<meta name="msapplication-TileColor" content="#020617" />
<meta name="theme-color" content="#020617" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index, follow" />
<link rel="manifest" href={`${APP_CONFIG.viteUrl}/site.webmanifest`} />
<meta
name="description"
content="Gain control of the tone.js transport with a modern routable typescript-react environment. 🚂🚃"
/>
<meta name="description" content={APP_CONFIG.description} />
</>
)

Expand Down

0 comments on commit 852e5be

Please sign in to comment.