Default sidebar and WIP PluginLoader
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
import '../styles/globals.css'
|
||||
import type { AppProps } from 'next/app'
|
||||
import "../styles/globals.css";
|
||||
|
||||
import { Provider } from "react-redux";
|
||||
import type { AppProps } from "next/app";
|
||||
|
||||
import store from "../lib/store";
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<Component {...pageProps} />
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
export default MyApp;
|
||||
|
||||
@@ -3,8 +3,11 @@ import Head from "next/head";
|
||||
import "mapbox-gl/dist/mapbox-gl.css";
|
||||
|
||||
import Map from "../components/Map";
|
||||
import { useAppDispatch } from "../lib/hooks";
|
||||
import { setPluginsTxt } from "../slices/pluginsTxt";
|
||||
|
||||
const Home: NextPage = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
@@ -53,7 +56,31 @@ const Home: NextPage = () => {
|
||||
<meta name="twitter:site" content="@tyhallada" />
|
||||
<meta name="twitter:creator" content="@tyhallada" />
|
||||
</Head>
|
||||
<Map />
|
||||
<div
|
||||
style={{
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
}}
|
||||
onDragOver={(evt) => {
|
||||
console.log("drag over!");
|
||||
evt.preventDefault();
|
||||
}}
|
||||
onDrop={async (evt) => {
|
||||
console.log("drop!");
|
||||
evt.preventDefault();
|
||||
|
||||
if (evt.dataTransfer.items && evt.dataTransfer.items.length > 0) {
|
||||
const file = evt.dataTransfer.items[0].getAsFile();
|
||||
if (file) {
|
||||
dispatch(setPluginsTxt(await file.text()));
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Map />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user