getting rid of files

This commit is contained in:
talksik
2022-03-17 11:02:08 -04:00
parent e631a47149
commit 4a6b4deec5
35 changed files with 0 additions and 863 deletions
-64
View File
@@ -1,64 +0,0 @@
import {
Add,
CardGiftcardRounded,
ContactsRounded,
LinkRounded,
PushPinRounded,
} from "@mui/icons-material";
import Logo, { LogoType } from "../../components/Logo";
export default function Home() {
return (
<div className="h-screen w-screen bg-slate-700">
{/* header */}
<div className="flex flex-row items-center bg-slate-800 h-20">
<Logo type={LogoType.small} className="scale-[0.4]" />
<input
placeholder="type / to search"
className="placeholder:text-slate-400 bg-transparent outline-none text-slate-100"
/>
<button className="ml-auto hover:scale-110 bg-slate-600 text-teal-500 py-1 px-2 rounded-lg text-sm">
flow state
</button>
<span className="relative mx-5">
<img
src="https://lh3.googleusercontent.com/a-/AOh14Gjm29Sd1Wnm8NvZbXkosvf6SoID6kBP5OHRLVIOBQ=s96-c"
className="rounded-lg h-8 hover:bg-slate-200 hover:cursor-pointer hover:scale-110"
alt="cannot find"
/>
<span className="absolute bottom-0 -right-1.5 rounded-full bg-emerald-600 h-3 w-3"></span>
</span>
</div>
{/* actions navbar */}
<div className="flex justify-end mx-10 mt-5 space-x-3">
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<ContactsRounded className="text-slate-100" fontSize="small" />
</span>
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<LinkRounded className="text-slate-100" fontSize="small" />
</span>
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<CardGiftcardRounded className="text-pink-100" fontSize="small" />
</span>
<span className="hover:bg-slate-500 p-1 rounded-full cursor-pointer flex justify-center items-center">
<Add className="text-slate-100" fontSize="small" />
</span>
</div>
{/* pinned conversations */}
<div className="m-5 bg-slate-500 shadow-lg rounded">
<span className="flex flex-row justify-start p-4 items-center">
<PushPinRounded className="text-slate-100" />
<span className="tracking-wider text-slate-100 uppercase text-sm font-semibold">
Pinned
</span>
</span>
</div>
</div>
);
}
@@ -1,65 +0,0 @@
import { Button, CircularProgress } from "@mui/material";
import { localHost, useGetUserDetails } from "../../controller";
import { useEffect, useState } from "react";
import Logo from "../../components/Logo";
import { UserInfo } from "@nirvana/core/models";
import axios from "axios";
import { channels } from "../../shared/constants";
import { useNavigate } from "react-router-dom";
export default function Login() {
let navigate = useNavigate();
const logIn = () => {
// send to main process
window.API.send(channels.ACTIVATE_LOG_IN);
};
useEffect(() => {
window.API.receive(channels.AUTH_TOKENS, async (tokens: any) => {
console.log(tokens);
const { access_token, id_token, refresh_token } = tokens;
// get user info from access token
const userInfo: UserInfo = await (
await fetch(
`https://www.googleapis.com/oauth2/v1/userinfo?access_token=${access_token}`
)
).json();
console.log("user data: ");
console.log(userInfo);
// if user is an existing user, then continue to next route
axios({
method: "GET",
url: localHost + `/user`,
headers: {
Authorization:
"eyJhbGciOiJSUzI1NiIsImtpZCI6ImQ2M2RiZTczYWFkODhjODU0ZGUwZDhkNmMwMTRjMzZkYzI1YzQyOTIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiI0MjM1MzMyNDQ5NTMtYmFubGlnb2JnYm9mOGhnODlpNmNyMWw3dTBwN2MycGsuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiI0MjM1MzMyNDQ5NTMtYmFubGlnb2JnYm9mOGhnODlpNmNyMWw3dTBwN2MycGsuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTM0NzA3ODY2OTAzNTMxMDkwODYiLCJlbWFpbCI6InBhdGVsLmFyanVuNTBAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImF0X2hhc2giOiJKRlBBOC15TGgxeGlGOW5acUZQU0FBIiwibmFtZSI6IkFyanVuIFBhdGVsIiwicGljdHVyZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hLS9BT2gxNEdqbTI5U2QxV25tOE52WmJYa29zdmY2U29JRDZrQlA1T0hSTFZJT0JRPXM5Ni1jIiwiZ2l2ZW5fbmFtZSI6IkFyanVuIiwiZmFtaWx5X25hbWUiOiJQYXRlbCIsImxvY2FsZSI6ImVuIiwiaWF0IjoxNjQ3Mzc4MzgzLCJleHAiOjE2NDczODE5ODN9.llIYMEjq3Ye1UFxiKIsgtjnRho2Ad7dQjCSFVDDlsiH3AVq_MssoKTXMS0tuHpQAZAfyqbi1kRpp4Ax3mFJb44z2OIyzOTDzhcNB_L_3C8U3gRuSmUaVfBa7EdkobkxByee3ddvjekD7Y9dobtXs3IllldjewD9Eg9FZmEkuSN6yYVxxRLYNYTjk_BAA17QKKkPPpyanAHHXLwxpMFhQc34tuAYCYmmDQQijV8YVvU4r9ruPpysumVXlUmX3CuNg9P415Dq1lUHQxaf5hWf_6RxIsw9PNg1wZ8CuJGvmLFnGBRQACKgnAkI9E7-tu2tWe3glRhORZlQmgRCKqG5xoA",
},
}).then((res) => console.log(res));
navigate("/home");
// if user is not an existing user, then show create account page
});
// return () => {
// ipcRenderer.removeAllListeners(channels.AUTH_TOKEN);
// };
}, []);
return (
<div className="container flex flex-col space-y-5 justify-center items-center h-screen bg-slate-900">
<Logo className="scale-50" />
<CircularProgress />
<Button onClick={logIn} variant="contained">
Sign In
</Button>
</div>
);
}
@@ -1,3 +0,0 @@
export default function Profile() {
return <span>this is the profile page</span>;
}