diff --git a/nginx/pispotter.conf b/nginx/pispotter.conf index 4e395b7..010c0b2 100644 --- a/nginx/pispotter.conf +++ b/nginx/pispotter.conf @@ -1,4 +1,12 @@ location ^~ /pispotter { alias /var/www/pispotter; - try_files $uri $uri/ /pispotter/index.html; + try_files $uri $uri/ /pispotter/index.html; + + location ~ \.php$ { + try_files $uri =404; + include fastcgi_params; + fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_param SCRIPT_FILENAME $request_filename; + + } } diff --git a/src/App.jsx b/src/App.jsx index c5a41f7..c62ae4a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,6 +1,11 @@ import { React, Fragment, useState } from "react"; import { Dialog, Transition } from "@headlessui/react"; -import { HomeIcon, MenuAlt2Icon, XIcon } from "@heroicons/react/outline"; +import { + HomeIcon, + MenuAlt2Icon, + SearchIcon, + XIcon, +} from "@heroicons/react/outline"; import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; import Spotter from "./pages/spotter"; import { ApiProvider } from "./contexts/ApiContext"; @@ -13,6 +18,12 @@ function classNames(...classes) { return classes.filter(Boolean).join(" "); } +const defaultURL = () => { + if (!process.env.NODE_ENV || process.env.NODE_ENV === "development") + return "http://192.168.1.184"; + return ""; +}; + const App = () => { const [sidebarOpen, setSidebarOpen] = useState(false); @@ -21,7 +32,7 @@ const App = () => { return ( <> - +
{
{/* Sidebar component, swap this element with another sidebar if you like */}
-
- Blah. +
+ + Pi-Spotter