Moved old app into its component.
This commit is contained in:
parent
7f0f856d19
commit
a041941a70
@ -1,4 +1,4 @@
|
||||
.App {
|
||||
.reddit-slideshow {
|
||||
position: relative;
|
||||
background-color: black;
|
||||
height: 100vh;
|
@ -1,8 +1,8 @@
|
||||
import React, { Component } from "react";
|
||||
import axios from "axios";
|
||||
|
||||
import Layout from "../components/Layout/Layout";
|
||||
import "./App.css";
|
||||
import Layout from "../Layout/Layout";
|
||||
import "./RedditSlideshow.css";
|
||||
|
||||
class App extends Component {
|
||||
state = {
|
||||
@ -409,9 +409,9 @@ class App extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<div className="reddit-slideshow">
|
||||
<Layout
|
||||
className="App"
|
||||
className="reddit-slideshow"
|
||||
post={this.state.posts.length ? this.state.posts[this.state.currentPost] : null}
|
||||
prev={this.state.posts.length ? this.state.posts[this.state.prevPost] : null}
|
||||
prevHandler={this.prevSlideHandler}
|
@ -1,9 +0,0 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
|
||||
it('renders without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
ReactDOM.render(<App />, div);
|
||||
ReactDOM.unmountComponentAtNode(div);
|
||||
});
|
Loading…
Reference in New Issue
Block a user