mirror of
https://github.com/tomru/advcal.git
synced 2026-03-02 22:17:17 +01:00
use jsx extension for react stuff
This commit is contained in:
@@ -8,7 +8,8 @@ const Header = () => {
|
||||
"//api.giphy.com/v1/gifs/random?tag=christmas&api_key=3ziHSa4ptYJdv2dOuawgzpBhhiW09Ss1"
|
||||
);
|
||||
const { data } = await response.json();
|
||||
setGifUrl(data.image_mp4_url);
|
||||
console.log(data)
|
||||
setGifUrl(data.image_webp_url);
|
||||
}
|
||||
|
||||
getGif();
|
||||
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
|
||||
|
||||
import AppContext from "./app";
|
||||
|
||||
const AppProvider = ({ debug, children }) => {
|
||||
const AppProvider = ({ debug = false, children }) => {
|
||||
const [songs, setSongs] = useState(null);
|
||||
const [openSong, setOpenSong] = useState(null);
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import React from "react";
|
||||
import Home from "./index";
|
||||
|
||||
const HomeDebug = () => {
|
||||
return <Home debug={true} />;
|
||||
};
|
||||
|
||||
export default HomeDebug;
|
||||
28
pages/debug.jsx
Normal file
28
pages/debug.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from "react";
|
||||
import Head from "next/head";
|
||||
|
||||
import AppProvider from "../context/appProvider";
|
||||
|
||||
import Header from "../components/header";
|
||||
import Calendar from "../components/calendar";
|
||||
import ShowDoorDialog from "../components/showdoordialog";
|
||||
import Nav from "../components/nav";
|
||||
|
||||
const HomeDebug = () => {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>DEBUG: Bello's Adventskalender 2020</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<AppProvider debug={true}>
|
||||
<Header />
|
||||
<Calendar />
|
||||
<ShowDoorDialog />
|
||||
<Nav />
|
||||
</AppProvider>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HomeDebug;
|
||||
@@ -7,14 +7,14 @@ import Calendar from "../components/calendar";
|
||||
import ShowDoorDialog from "../components/showdoordialog";
|
||||
import Nav from "../components/nav";
|
||||
|
||||
export default function Home({ debug = false }) {
|
||||
export default function Home() {
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>Bello's Adventskalender 2020</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<AppProvider debug={debug}>
|
||||
<AppProvider>
|
||||
<Header />
|
||||
<Calendar />
|
||||
<ShowDoorDialog />
|
||||
Reference in New Issue
Block a user