Moved old app into its component.

This commit is contained in:
moonstar-x 2023-06-02 12:36:27 -05:00
parent 7f0f856d19
commit a041941a70
3 changed files with 5 additions and 14 deletions

View File

@ -1,4 +1,4 @@
.App {
.reddit-slideshow {
position: relative;
background-color: black;
height: 100vh;

View File

@ -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}

View File

@ -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);
});