From 93f24011f9613b7785b37dc4b0c963d9be22ba30 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 21 Apr 2021 09:17:48 +0200 Subject: more components without inline css --- components/notificationsArea.tsx | 103 ++++++--------------------------------- 1 file changed, 15 insertions(+), 88 deletions(-) (limited to 'components/notificationsArea.tsx') diff --git a/components/notificationsArea.tsx b/components/notificationsArea.tsx index 9573b72..8ee554a 100644 --- a/components/notificationsArea.tsx +++ b/components/notificationsArea.tsx @@ -1,5 +1,5 @@ import axios from 'axios'; -import { CSSProperties, ReactNode, useContext, useEffect, useState } from 'react'; +import { ReactNode, useContext, useEffect, useState } from 'react'; import { gameInfo, userInfo } from '../api/api'; import { AccountAvatar } from './account'; @@ -35,52 +35,14 @@ export function NotificationsArea(props: { setPreviousMessages(messages); }); - return props.visible && -

Meldingen

-
+ return props.visible && +

Meldingen

+
{props.gameInvites?.map(game => )} {props.friendRequests?.map(user => )} {messages == 0 - &&
-

+ &&
+

Geen meldingen

} @@ -88,48 +50,24 @@ export function NotificationsArea(props: { ; } -var FriendRequestButtonStyle: CSSProperties = { - borderRadius: 6, - display: 'inline-block', - marginLeft: 0, - textAlign: 'center', -}; - function Acceptable(props: { children?: ReactNode; onAccept?: () => void; onDeny?: () => void; }) { - return -
+ return +
{props.children} -
+
} text='Accepteren' /> } text='Verwijderen' /> @@ -171,14 +109,8 @@ function FriendRequest(props: { > -