Crab Fit PWA upgrade

This commit is contained in:
Ben Grant 2021-04-13 19:55:48 +10:00
parent 283b60e91b
commit 2e3091b7e6
10 changed files with 331 additions and 63 deletions

View file

@ -49,6 +49,7 @@ const Event = (props) => {
const { register, handleSubmit } = useForm();
const { id } = props.match.params;
const { offline } = props;
const [timezone, setTimezone] = useState(Intl.DateTimeFormat().resolvedOptions().timeZone);
const [user, setUser] = useState(null);
const [password, setPassword] = useState(null);
@ -297,10 +298,17 @@ const Event = (props) => {
</ShareInfo>
</>
) : (
<div style={{ margin: '100px 0' }}>
<EventName>Event not found</EventName>
<ShareInfo>Check that the url you entered is correct.</ShareInfo>
</div>
offline ? (
<div style={{ margin: '100px 0' }}>
<EventName>You are offline</EventName>
<ShareInfo>A Crab Fit doesn't work offline.<br />Make sure you're connected to the internet and try again.</ShareInfo>
</div>
) : (
<div style={{ margin: '100px 0' }}>
<EventName>Event not found</EventName>
<ShareInfo>Check that the url you entered is correct.</ShareInfo>
</div>
)
)}
</StyledMain>