Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "../styles/pages/home.css";
- import { useState, useEffect } from 'react';
- import api from "../api";
- export default function Home() {
- const [homeText, setHomeText] = useState("");
- useEffect(() => {
- api("/homeText/")
- .then(res => {
- console.log(res.data);
- setHomeText(res.data.homeText)
- });
- }, []);
- return (
- <div className="main-container container-fluid">
- <div className="title-container container">
- <h1 className="title">Mek's Application Hub</h1>
- </div>
- <div className="body-container container">
- <span className="body-text">
- {homeText ? homeText : "No Home Text Has Been Set"}
- No Home Text Set
- </span>
- </div>
- </div>
- );
- };
Advertisement
Add Comment
Please, Sign In to add comment