Compare commits
No commits in common. "a90453eefc05fd8355e40163f70acd475d8abafc" and "ffc43e9071709f16e09c810800ec2e040ab60d46" have entirely different histories.
a90453eefc
...
ffc43e9071
|
|
@ -1,5 +1,4 @@
|
|||
NEXT_PUBLIC_API_URL="https://api.a10y.techwork.zone"
|
||||
NEXT_PUBLIC_HOSTNAME=availability.techwork.zone
|
||||
|
||||
# Google auth for calendar syncing, feature will be disabled if these aren't set
|
||||
# NEXT_PUBLIC_GOOGLE_CLIENT_ID=""
|
||||
|
|
|
|||
|
|
@ -46,10 +46,5 @@
|
|||
"sass": "^1.63.4",
|
||||
"typescript": "^5.1.3",
|
||||
"typescript-plugin-css-modules": "^5.0.1"
|
||||
},
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
"arrowParens": "avoid",
|
||||
"singleQuote": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import { makeClass, relativeTimeFormat } from '/src/utils'
|
|||
|
||||
import EventAvailabilities from './EventAvailabilities'
|
||||
import styles from './page.module.scss'
|
||||
import appLink from '/src/utils/appLink'
|
||||
|
||||
interface PageProps {
|
||||
params: { id: string }
|
||||
|
|
@ -50,10 +49,10 @@ const Page = async ({ params }: PageProps) => {
|
|||
>{t('common:created', { date: relativeTimeFormat(Temporal.Instant.fromEpochSeconds(event.created_at), i18n.language) })}</span>
|
||||
|
||||
<Copyable className={styles.info}>
|
||||
{appLink(event.id)}
|
||||
{`https://crab.fit/${event.id}`}
|
||||
</Copyable>
|
||||
<p className={makeClass(styles.info, styles.noPrint)}>
|
||||
<Trans i18nKey="event:nav.shareinfo" t={t} i18n={i18n}>_<a href={`mailto:?subject=${encodeURIComponent(t('event:nav.email_subject', { event_name: event.name }))}&body=${encodeURIComponent(`${t('event:nav.email_body')} ${appLink(event.id)}`)}`}>_</a>_</Trans>
|
||||
<Trans i18nKey="event:nav.shareinfo" t={t} i18n={i18n}>_<a href={`mailto:?subject=${encodeURIComponent(t('event:nav.email_subject', { event_name: event.name }))}&body=${encodeURIComponent(`${t('event:nav.email_body')} https://crab.fit/${event.id}`)}`}>_</a>_</Trans>
|
||||
</p>
|
||||
</Content>
|
||||
</Suspense>
|
||||
|
|
|
|||
|
|
@ -8,12 +8,11 @@ import { fallbackLng } from '/src/i18n/options'
|
|||
import { useTranslation } from '/src/i18n/server'
|
||||
|
||||
import './global.css'
|
||||
import appLink from '../utils/appLink'
|
||||
|
||||
const karla = Karla({ subsets: ['latin'] })
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(appLink('')),
|
||||
metadataBase: new URL('https://crab.fit'),
|
||||
title: {
|
||||
absolute: 'Crab Fit',
|
||||
template: '%s - Crab Fit',
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { EventResponse } from '/src/config/api'
|
|||
import { useTranslation } from '/src/i18n/client'
|
||||
|
||||
import styles from './EventInfo.module.scss'
|
||||
import appLink from '/src/utils/appLink'
|
||||
|
||||
interface EventInfoProps {
|
||||
event: EventResponse
|
||||
|
|
@ -17,10 +16,10 @@ const EventInfo = ({ event }: EventInfoProps) => {
|
|||
return <div className={styles.wrapper}>
|
||||
<h2>{event.name}</h2>
|
||||
<Copyable className={styles.info}>
|
||||
{appLink(event.id)}
|
||||
{`https://crab.fit/${event.id}`}
|
||||
</Copyable>
|
||||
<p className={styles.info}>
|
||||
<Trans i18nKey="event:nav.shareinfo_alt" t={t} i18n={i18n}>_<a href={`mailto:?subject=${encodeURIComponent(t('nav.email_subject', { event_name: event.name }))}&body=${encodeURIComponent(`${t('nav.email_body')} ${appLink(event.id)}`)}`} target="_blank">_</a>_</Trans>
|
||||
<Trans i18nKey="event:nav.shareinfo_alt" t={t} i18n={i18n}>_<a href={`mailto:?subject=${encodeURIComponent(t('nav.email_subject', { event_name: event.name }))}&body=${encodeURIComponent(`${t('nav.email_body')} https://crab.fit/${event.id}`)}`} target="_blank">_</a>_</Trans>
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import logo from '/src/res/logo.svg'
|
|||
import { makeClass } from '/src/utils'
|
||||
|
||||
import styles from './Header.module.scss'
|
||||
import appLink from '/src/utils/appLink'
|
||||
|
||||
const samuraiBob = localFont({
|
||||
src: './samuraibob.woff2',
|
||||
|
|
@ -38,7 +37,6 @@ const Header = async ({ isFull, isSmall }: HeaderProps) => {
|
|||
</div>
|
||||
<span className={styles.tagline}>{t('common:tagline')}</span>
|
||||
</Link>}
|
||||
<p>{appLink('test')}</p>
|
||||
</header>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
export default function appLink(path: string) {
|
||||
const proto = process?.env?.NODE_ENV === 'production' ? 'https' : 'http'
|
||||
const host =
|
||||
process?.env?.NEXT_PUBLIC_HOSTNAME ??
|
||||
(process?.env?.NODE_ENV === 'production' ? 'crab.fit' : 'localhost:3000')
|
||||
return `${proto}://${host}/${path}`
|
||||
}
|
||||
Loading…
Reference in a new issue