more stuff
This commit is contained in:
parent
7ba50976cf
commit
5f81ed1756
|
|
@ -1,3 +1,4 @@
|
||||||
*/.env
|
*/.env
|
||||||
test
|
test
|
||||||
*/.DS_STORE
|
*/.DS_STORE
|
||||||
|
.DS_STORE
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
cmd/watchtogether/watchtogether
|
||||||
|
|
@ -8,6 +8,7 @@ import { Container } from "../components/Container";
|
||||||
import { Footer } from "../components/Footer";
|
import { Footer } from "../components/Footer";
|
||||||
import { Hero } from "../components/Hero";
|
import { Hero } from "../components/Hero";
|
||||||
import { Main } from "../components/Main";
|
import { Main } from "../components/Main";
|
||||||
|
import isDev from "../util/isDev";
|
||||||
|
|
||||||
const Index: NextPage = () => {
|
const Index: NextPage = () => {
|
||||||
return (
|
return (
|
||||||
|
|
@ -22,6 +23,7 @@ const Index: NextPage = () => {
|
||||||
maxWidth="200"
|
maxWidth="200"
|
||||||
alignSelf="center"
|
alignSelf="center"
|
||||||
onClick={() => signIn("discord")}
|
onClick={() => signIn("discord")}
|
||||||
|
disabled={!isDev()}
|
||||||
>
|
>
|
||||||
Login With Discord
|
Login With Discord
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,10 @@ import isBrowser from "../util/isBrowser";
|
||||||
const Player = dynamic(() => import("../components/Player"), { ssr: false });
|
const Player = dynamic(() => import("../components/Player"), { ssr: false });
|
||||||
|
|
||||||
interface PlayerPageProps {
|
interface PlayerPageProps {
|
||||||
URI: string;
|
|
||||||
user: User;
|
user: User;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PlayerPage: NextPage<PlayerPageProps> = ({ URI, user }) => {
|
const PlayerPage: NextPage<PlayerPageProps> = ({ user }) => {
|
||||||
const playerRef = useRef<ReactPlayer>();
|
const playerRef = useRef<ReactPlayer>();
|
||||||
const socket = useWS({ user });
|
const socket = useWS({ user });
|
||||||
const [id, setID] = useState<string>("");
|
const [id, setID] = useState<string>("");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
export default function isDev() {
|
||||||
|
return process.env.NODE_ENV === "development";
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
// nice and easy way to get types for the
|
|
||||||
|
|
||||||
import { User } from "next-auth";
|
import { User } from "next-auth";
|
||||||
import EventEmitter from "events";
|
import EventEmitter from "events";
|
||||||
import IdentityData from "../interfaces/Identity";
|
import IdentityData from "../interfaces/Identity";
|
||||||
|
|
@ -8,6 +6,7 @@ import Message from "../util/Message";
|
||||||
import MessageUtil from "../util/MessageUtil";
|
import MessageUtil from "../util/MessageUtil";
|
||||||
|
|
||||||
// browser socket
|
// browser socket
|
||||||
|
// todo: write a shim for this
|
||||||
let Websocket: typeof WebSocket;
|
let Websocket: typeof WebSocket;
|
||||||
if (typeof window !== "undefined") {
|
if (typeof window !== "undefined") {
|
||||||
Websocket = window.WebSocket;
|
Websocket = window.WebSocket;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue