sdy

remove BrowserRouter

......@@ -2,7 +2,7 @@ import React from "react";
import styled from "styled-components";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faArrowRight } from "@fortawesome/free-solid-svg-icons";
import { BrowserRouter as Router, Link } from "react-router-dom";
import { Link } from "react-router-dom";
const Wrapper = styled.div`
display: flex;
......@@ -93,25 +93,23 @@ const StyledLink = styled(Link)`
export default ({ roomArray }) => {
return (
<Router>
<Wrapper>
<RoomContainer>
<RoomUL>
{roomArray &&
roomArray.map((e) => (
<StyledLink to={e.name} key={e.id}>
<RoomItem>{e.name}</RoomItem>
<FontAwesomeIcon icon={faArrowRight} />
</StyledLink>
))}
</RoomUL>
</RoomContainer>
<CreateContainer>
<StyledLink to="/">
<span>Create New Room</span>
</StyledLink>
</CreateContainer>
</Wrapper>
</Router>
<Wrapper>
<RoomContainer>
<RoomUL>
{roomArray &&
roomArray.map((e) => (
<StyledLink to={e.name} key={e.id}>
<RoomItem>{e.name}</RoomItem>
<FontAwesomeIcon icon={faArrowRight} />
</StyledLink>
))}
</RoomUL>
</RoomContainer>
<CreateContainer>
<StyledLink to="/">
<span>Create New Room</span>
</StyledLink>
</CreateContainer>
</Wrapper>
);
};
......