more stuff
This commit is contained in:
parent
7ba50976cf
commit
5f81ed1756
|
|
@ -1,3 +1,4 @@
|
|||
*/.env
|
||||
test
|
||||
*/.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 { Hero } from "../components/Hero";
|
||||
import { Main } from "../components/Main";
|
||||
import isDev from "../util/isDev";
|
||||
|
||||
const Index: NextPage = () => {
|
||||
return (
|
||||
|
|
@ -22,6 +23,7 @@ const Index: NextPage = () => {
|
|||
maxWidth="200"
|
||||
alignSelf="center"
|
||||
onClick={() => signIn("discord")}
|
||||
disabled={!isDev()}
|
||||
>
|
||||
Login With Discord
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -14,11 +14,10 @@ import isBrowser from "../util/isBrowser";
|
|||
const Player = dynamic(() => import("../components/Player"), { ssr: false });
|
||||
|
||||
interface PlayerPageProps {
|
||||
URI: string;
|
||||
user: User;
|
||||
}
|
||||
|
||||
const PlayerPage: NextPage<PlayerPageProps> = ({ URI, user }) => {
|
||||
const PlayerPage: NextPage<PlayerPageProps> = ({ user }) => {
|
||||
const playerRef = useRef<ReactPlayer>();
|
||||
const socket = useWS({ user });
|
||||
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 EventEmitter from "events";
|
||||
import IdentityData from "../interfaces/Identity";
|
||||
|
|
@ -8,6 +6,7 @@ import Message from "../util/Message";
|
|||
import MessageUtil from "../util/MessageUtil";
|
||||
|
||||
// browser socket
|
||||
// todo: write a shim for this
|
||||
let Websocket: typeof WebSocket;
|
||||
if (typeof window !== "undefined") {
|
||||
Websocket = window.WebSocket;
|
||||
|
|
|
|||
Loading…
Reference in New Issue