import styled from '@emotion/styled';
import type { MouseEvent } from 'react';
import { Button, useOnOff } from 'react-science/ui';
import { useDispatch } from '../../context/DispatchContext.js';
export default function AboutUsZakodium() {
const [isSecretOpen, openSecret] = useOnOff();
function handleClick(event: MouseEvent) {
if (event.shiftKey && event.altKey) {
openSecret();
}
}
return (
<>
Zakodium
{` Sàrl (Switzerland).`}
{isSecretOpen && }
>
);
}
const ThrowerDiv = styled.div`
display: flex;
flex-direction: column;
gap: 1rem;
`;
/**
* This component is here for us so we can test the impact of thrown exceptions
* in the deployed application.
*/
function SecretThrower() {
const [shouldThrow, setShouldThrow] = useOnOff();
const dispatch = useDispatch();
if (shouldThrow) {
throw new Error('Error thrown in React render');
}
return (
);
}