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_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
|
# Google auth for calendar syncing, feature will be disabled if these aren't set
|
||||||
# NEXT_PUBLIC_GOOGLE_CLIENT_ID=""
|
# NEXT_PUBLIC_GOOGLE_CLIENT_ID=""
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,5 @@
|
||||||
"sass": "^1.63.4",
|
"sass": "^1.63.4",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.3",
|
||||||
"typescript-plugin-css-modules": "^5.0.1"
|
"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 EventAvailabilities from './EventAvailabilities'
|
||||||
import styles from './page.module.scss'
|
import styles from './page.module.scss'
|
||||||
import appLink from '/src/utils/appLink'
|
|
||||||
|
|
||||||
interface PageProps {
|
interface PageProps {
|
||||||
params: { id: string }
|
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>
|
>{t('common:created', { date: relativeTimeFormat(Temporal.Instant.fromEpochSeconds(event.created_at), i18n.language) })}</span>
|
||||||
|
|
||||||
<Copyable className={styles.info}>
|
<Copyable className={styles.info}>
|
||||||
{appLink(event.id)}
|
{`https://crab.fit/${event.id}`}
|
||||||
</Copyable>
|
</Copyable>
|
||||||
<p className={makeClass(styles.info, styles.noPrint)}>
|
<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>
|
</p>
|
||||||
</Content>
|
</Content>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,11 @@ import { fallbackLng } from '/src/i18n/options'
|
||||||
import { useTranslation } from '/src/i18n/server'
|
import { useTranslation } from '/src/i18n/server'
|
||||||
|
|
||||||
import './global.css'
|
import './global.css'
|
||||||
import appLink from '../utils/appLink'
|
|
||||||
|
|
||||||
const karla = Karla({ subsets: ['latin'] })
|
const karla = Karla({ subsets: ['latin'] })
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
metadataBase: new URL(appLink('')),
|
metadataBase: new URL('https://crab.fit'),
|
||||||
title: {
|
title: {
|
||||||
absolute: 'Crab Fit',
|
absolute: 'Crab Fit',
|
||||||
template: '%s - Crab Fit',
|
template: '%s - Crab Fit',
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { EventResponse } from '/src/config/api'
|
||||||
import { useTranslation } from '/src/i18n/client'
|
import { useTranslation } from '/src/i18n/client'
|
||||||
|
|
||||||
import styles from './EventInfo.module.scss'
|
import styles from './EventInfo.module.scss'
|
||||||
import appLink from '/src/utils/appLink'
|
|
||||||
|
|
||||||
interface EventInfoProps {
|
interface EventInfoProps {
|
||||||
event: EventResponse
|
event: EventResponse
|
||||||
|
|
@ -17,10 +16,10 @@ const EventInfo = ({ event }: EventInfoProps) => {
|
||||||
return <div className={styles.wrapper}>
|
return <div className={styles.wrapper}>
|
||||||
<h2>{event.name}</h2>
|
<h2>{event.name}</h2>
|
||||||
<Copyable className={styles.info}>
|
<Copyable className={styles.info}>
|
||||||
{appLink(event.id)}
|
{`https://crab.fit/${event.id}`}
|
||||||
</Copyable>
|
</Copyable>
|
||||||
<p className={styles.info}>
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import logo from '/src/res/logo.svg'
|
||||||
import { makeClass } from '/src/utils'
|
import { makeClass } from '/src/utils'
|
||||||
|
|
||||||
import styles from './Header.module.scss'
|
import styles from './Header.module.scss'
|
||||||
import appLink from '/src/utils/appLink'
|
|
||||||
|
|
||||||
const samuraiBob = localFont({
|
const samuraiBob = localFont({
|
||||||
src: './samuraibob.woff2',
|
src: './samuraibob.woff2',
|
||||||
|
|
@ -38,7 +37,6 @@ const Header = async ({ isFull, isSmall }: HeaderProps) => {
|
||||||
</div>
|
</div>
|
||||||
<span className={styles.tagline}>{t('common:tagline')}</span>
|
<span className={styles.tagline}>{t('common:tagline')}</span>
|
||||||
</Link>}
|
</Link>}
|
||||||
<p>{appLink('test')}</p>
|
|
||||||
</header>
|
</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