diff --git a/dailyjs/live-fitness/pages/index.js b/dailyjs/live-fitness/pages/index.js index 113cbe2..262d6a7 100644 --- a/dailyjs/live-fitness/pages/index.js +++ b/dailyjs/live-fitness/pages/index.js @@ -1,8 +1,130 @@ -import React from 'react'; +import React, { useState } from 'react'; +import { Button } from '@dailyjs/shared/components/Button'; +import Field from '@dailyjs/shared/components/Field'; +import { TextInput, BooleanInput } from '@dailyjs/shared/components/Input'; +import MessageCard from '@dailyjs/shared/components/MessageCard'; +import Image from 'next/image'; import PropTypes from 'prop-types'; +import { ReactComponent as DailyLogo } from '../public/images/daily-logo.svg'; +import SplashImage from '../public/images/splash.jpg'; -export default function Index({ domain, isConfigured }) { - return
Hello
; +export default function Index({ isConfigured, domain }) { + const [fetching, setFetching] = useState(false); + const [joinedAsOwner, setJoinAsOwner] = useState(false); + const [roomName, setRoomName] = useState(); + + if (!isConfigured) { + return ( +
+ +

+ Please ensure you have set both the DAILY_API_KEY and{' '} + DAILY_DOMAIN environmental variables. An example can be + found in the provided env.example file. +

+

+ If you do not yet have a Daily developer account, please{' '} + + create one now + + . You can find your Daily API key on the{' '} + + developer page + {' '} + of the dashboard. +

+
+ +
+ ); + } + return ( +
+
+ +
+ + +
+ ); } Index.propTypes = { diff --git a/dailyjs/live-fitness/public/images/daily-logo.svg b/dailyjs/live-fitness/public/images/daily-logo.svg new file mode 100644 index 0000000..ba11f78 --- /dev/null +++ b/dailyjs/live-fitness/public/images/daily-logo.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/dailyjs/live-fitness/public/images/splash.jpg b/dailyjs/live-fitness/public/images/splash.jpg new file mode 100644 index 0000000..cc86932 Binary files /dev/null and b/dailyjs/live-fitness/public/images/splash.jpg differ diff --git a/dailyjs/shared/components/GlobalStyle/GlobalStyle.js b/dailyjs/shared/components/GlobalStyle/GlobalStyle.js index 26be0c5..553f294 100644 --- a/dailyjs/shared/components/GlobalStyle/GlobalStyle.js +++ b/dailyjs/shared/components/GlobalStyle/GlobalStyle.js @@ -108,6 +108,13 @@ export const GlobalStyle = () => ( line-height: 1.6; } + hr { + border: none; + height: 1px; + background-color: var(--gray-light); + margin: var(--spacing-sm) 0; + } + code { display: inline; color: var(--text-pre); diff --git a/dailyjs/shared/components/MessageCard/MessageCard.js b/dailyjs/shared/components/MessageCard/MessageCard.js index ec63a43..89a4f79 100644 --- a/dailyjs/shared/components/MessageCard/MessageCard.js +++ b/dailyjs/shared/components/MessageCard/MessageCard.js @@ -8,17 +8,25 @@ import { } from '@dailyjs/shared/components/Card'; import PropTypes from 'prop-types'; -export const MessageCard = ({ header, children, error = false, onBack }) => ( +export const MessageCard = ({ + header, + children, + error = false, + hideBack = false, + onBack, +}) => ( {header && {header}} {children && {children}} - - {onBack ? ( - - ) : ( - - )} - + {!hideBack && ( + + {onBack ? ( + + ) : ( + + )} + + )} {error && (