Skip to content

Commit 73cbdd7

Browse files
committed
Fix typings
1 parent cf5a3f4 commit 73cbdd7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

frontend/src/components/SessionDetail/CompatSessionDetail.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ const CompatSessionDetail: React.FC<Props> = ({ session }) => {
7272

7373
const sessionDetails = [...finishedAt];
7474

75-
const clientDetails: { label: string; value: string | JSX.Element }[] = [];
75+
const clientDetails: { label: string; value: string | React.ReactElement }[] =
76+
[];
7677

7778
if (data.ssoLogin?.redirectUri) {
7879
clientDetails.push({

frontend/src/components/UnverifiedEmailAlert/UnverifiedEmailAlert.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ export const UNVERIFIED_EMAILS_FRAGMENT = graphql(/* GraphQL */ `
2222
`);
2323

2424
const UnverifiedEmailAlert: React.FC<{
25-
user?: FragmentType<typeof UNVERIFIED_EMAILS_FRAGMENT>;
25+
user: FragmentType<typeof UNVERIFIED_EMAILS_FRAGMENT>;
2626
}> = ({ user }) => {
2727
const data = useFragment(UNVERIFIED_EMAILS_FRAGMENT, user);
2828
const [dismiss, setDismiss] = useState(false);
2929
const { t } = useTranslation();
30-
const currentCount = useRef<number>();
30+
const currentCount = useRef<number>(data.unverifiedEmails.totalCount);
3131

3232
const doDismiss = (): void => setDismiss(true);
3333

3434
useEffect(() => {
35-
if (currentCount.current !== data?.unverifiedEmails?.totalCount) {
36-
currentCount.current = data?.unverifiedEmails?.totalCount;
35+
if (currentCount.current !== data.unverifiedEmails.totalCount) {
36+
currentCount.current = data.unverifiedEmails.totalCount;
3737
setDismiss(false);
3838
}
3939
}, [data]);
4040

41-
if (!data?.unverifiedEmails?.totalCount || dismiss) {
41+
if (!data.unverifiedEmails.totalCount || dismiss) {
4242
return null;
4343
}
4444

0 commit comments

Comments
 (0)