From a49db05eb9098d69dea1031d876696d6d8ade949 Mon Sep 17 00:00:00 2001 From: Jeremie Pardou-Piquemal <571533+jrmi@users.noreply.github.com> Date: Thu, 15 Dec 2022 22:02:51 +0100 Subject: [PATCH] Refactor Welcome --- client/src/components/Welcome/index.jsx | 64 +++++++++++-------------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/client/src/components/Welcome/index.jsx b/client/src/components/Welcome/index.jsx index c217d72..030939d 100644 --- a/client/src/components/Welcome/index.jsx +++ b/client/src/components/Welcome/index.jsx @@ -1,47 +1,37 @@ -import React, { Component } from 'react'; import PropTypes from 'prop-types'; import RoomLink from '@/components/RoomLink'; -class Welcome extends Component { - constructor(props) { - super(props); - this.state = { - roomUrl: `https://darkwire.io/${props.roomId}`, - }; - } - - render() { - return ( +const Welcome = ({ roomId, translations, close }) => { + return ( +
+ v2.0 is a complete rewrite and includes several new features. Here are some highlights: +
- v2.0 is a complete rewrite and includes several new features. Here are some highlights: -
    -
  • Support on all modern browsers (Chrome, Firefox, Safari, Safari iOS, Android)
  • -
  • Slash commands (/nick, /me, /clear)
  • -
  • Room owners can lock the room, preventing anyone else from joining
  • -
  • Front-end rewritten in React.js and Redux
  • -
  • Send files up to 4 MB
  • -
-
- You can learn more{' '} - - here - - . -
-
-
-

Others can join this room using the following URL:

- -
- + You can learn more{' '} + + here + + .
- ); - } -} +
+

Others can join this room using the following URL:

+ +
+ +
+
+ ); +}; Welcome.propTypes = { roomId: PropTypes.string.isRequired,