import React, { useRef, useState, memo, useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { push } from 'connected-react-router'; import styled from 'styled-components'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faLongArrowAltRight, faLongArrowAltUp, faLongArrowAltDown } from '@fortawesome/free-solid-svg-icons'; import backgroundVideo from '../../../common/assets/onboarding.webm'; import { _getCurrentAccount } from '../../../common/utils/selectors'; import BisectHosting from '../../../ui/BisectHosting'; import KoFiButton from '../../../common/assets/ko-fi.png'; import { openModal } from '../../../common/reducers/modals/actions'; const Background = styled.div` position: absolute; width: 100%; height: 100%; background: ${props => props.theme.palette.colors.darkBlue}; overflow: hidden; `; const scrollToRef = ref => ref.current.scrollIntoView({ behavior: 'smooth', block: 'start' }); const Home = () => { const dispatch = useDispatch(); const [currentSlide, setCurrentSlide] = useState(0); const [initScrolled, setInitScrolled] = useState(false); const account = useSelector(_getCurrentAccount); const firstSlideRef = useRef(null); const secondSlideRef = useRef(null); const thirdSlideRef = useRef(null); const forthSlideRef = useRef(null); const fifthSlideRef = useRef(null); const executeScroll = type => { if (currentSlide + type < 0 || currentSlide + type > 5) return; setCurrentSlide(currentSlide + type); switch (currentSlide + type) { case 0: scrollToRef(firstSlideRef); break; case 1: scrollToRef(secondSlideRef); break; case 2: scrollToRef(thirdSlideRef); break; case 3: scrollToRef(forthSlideRef); break; case 4: scrollToRef(fifthSlideRef); break; default: scrollToRef(firstSlideRef); break; } }; useEffect(() => { setTimeout(() => { setInitScrolled(true); executeScroll(1); }, 4800); }, []); return (
props.theme.palette.grey[700]}; display: flex; flex-direction: column; justify-content: center; align-items: center; color: ${props => props.theme.palette.text.primary}; `} >
props.theme.palette.grey[800]}; display: flex; flex-direction: column; justify-content: center; align-items: center; `} >
{account.selectedProfile.name}, welcome to GDLauncher!
props.theme.palette.grey[700]}; display: flex; flex-direction: column; justify-content: center; align-items: center; `} >
GDlauncher is completely free and open source.
If you want to support us, consider renting a server on BisectHosting, our official partner!

dispatch(openModal('BisectHosting'))} />
props.theme.palette.grey[800]}; display: flex; flex-direction: column; justify-content: center; align-items: center; `} >
Or you can also support us through Ko-Fi.
Ko-Fi
props.theme.palette.grey[700]}; display: flex; flex-direction: column; justify-content: center; align-items: center; `} >
Also, don't forget to join us on Discord! This is where our community is!