Skip to content

Commit

Permalink
Merge pull request #94 from ReCoded-Org/i83-add_favicon+_title_+_fix_…
Browse files Browse the repository at this point in the history
…nouh_s_img_+_change_hadri_s_img_+_work_on_session_handling

I83 add favicon+ title + fix nouh s img + change hadri s img + work on session handling
  • Loading branch information
mohamedhadri authored Aug 29, 2022
2 parents 803153a + 30cd4cf commit a5828f0
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 63 deletions.
7 changes: 6 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
NEXT_PUBLIC_GOOGLE_MAP_KEY=AIzaSyAnHNX_kANW6oxjdcDoOs8VVwDAOsbA9ZY
<<<<<<< HEAD
GITHUB_ID= 06278944971ada50241b
GITHUB_SECRET = 0a489dbefa1825e83f17ea3d5bdeeee9bc78f7c3
=======
NEXT_PUBLIC_GOOGLE_MAP_KEY=AIzaSyAnHNX_kANW6oxjdcDoOs8VVwDAOsbA9ZY
>>>>>>> 219fb38c827154d2218e531b50b21e0d94eef5af
Binary file added public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/personal-pics/beyza.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/personal-pics/gizem.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/personal-pics/momomo.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/personal-pics/nouh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/personal-pics/salah.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/personal-pics/selin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions src/pages/_app.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { AuthContextProvider } from "context/AuthContext";
import Head from "next/head";
import { appWithTranslation } from "next-i18next";

import "@/styles/globals.css";

function MyApp({ Component, pageProps }) {
return (
<AuthContextProvider>
<Component {...pageProps} />;
</AuthContextProvider>
<>
<Head>
<title>Students Store</title>
<link rel='icon' href='/favicon.png' />
</Head>

<AuthContextProvider>
<Component {...pageProps} />;
</AuthContextProvider>
</>
);
}

Expand Down
14 changes: 7 additions & 7 deletions src/pages/about-us/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function AboutUsPage() {
<div className='m-auto mb-10 flex w-[200px] flex-col rounded-xl bg-[#585785] p-6 text-center align-middle duration-500 hover:shadow-xl hover:shadow-cyanaqua'>
<img
className='h-auto w-full rounded-full border-4 border-cyanaqua'
src='https://avatars.githubusercontent.com/u/4890766?v=4'
src='/images/personal-pics/salah.png'
alt='Salah avatar'
></img>
<h3 className='mt-1 text-lg font-semibold text-cyanaqua'>
Expand All @@ -72,7 +72,7 @@ function AboutUsPage() {
<div className='flex w-[200px] flex-col rounded-xl bg-[#585785] p-6 text-center align-middle duration-500 hover:shadow-xl hover:shadow-cyanaqua'>
<img
className='h-auto w-full rounded-full border-4 border-cyanaqua'
src='https://media-exp1.licdn.com/dms/image/C5603AQG7dsmBEvTG4w/profile-displayphoto-shrink_800_800/0/1581879286166?e=1665619200&v=beta&t=F69BFpyAuCMweyDVeZZfPByME_lJ6jlKoUDOf9eW_Zo'
src='images/personal-pics/nouh.png'
alt='Nouh avatar'
></img>
<h3 className='mt-1 text-lg font-semibold text-cyanaqua'>
Expand Down Expand Up @@ -100,7 +100,7 @@ function AboutUsPage() {
<div className='flex w-[200px] flex-col rounded-xl bg-[#585785] p-6 text-center align-middle duration-500 hover:shadow-xl hover:shadow-cyanaqua'>
<img
className='h-auto w-full rounded-full border-4 border-cyanaqua'
src='https://media-exp1.licdn.com/dms/image/C5603AQEW2FlGcGHerA/profile-displayphoto-shrink_800_800/0/1637622044999?e=1665619200&v=beta&t=A0UInMMejCSIiPiHFJXIUBPDfDOzOaaBEqMX9ej1NUQ'
src='images/personal-pics/gizem.jpg'
alt='Gizem avatar'
></img>
<h3 className='mt-1 text-lg font-semibold text-cyanaqua'>
Expand Down Expand Up @@ -128,7 +128,7 @@ function AboutUsPage() {
<div className='flex w-[200px] flex-col rounded-xl bg-[#585785] p-6 text-center align-middle duration-500 hover:shadow-xl hover:shadow-cyanaqua'>
<img
className='h-auto w-full rounded-full border-4 border-cyanaqua'
src='https://avatars.githubusercontent.com/u/100427748?v=4'
src='/images/personal-pics/selin.png'
alt='Selin avatar'
></img>
<h3 className='mt-1 text-lg font-semibold text-cyanaqua'>
Expand Down Expand Up @@ -156,7 +156,7 @@ function AboutUsPage() {
<div className='flex w-[200px] flex-col rounded-xl bg-[#585785] p-6 text-center align-middle duration-500 hover:shadow-xl hover:shadow-cyanaqua'>
<img
className='h-auto w-full rounded-full border-4 border-cyanaqua'
src='https://media-exp1.licdn.com/dms/image/C5603AQEHRu0d7HQf2g/profile-displayphoto-shrink_800_800/0/1655375124272?e=1665619200&v=beta&t=i8orfruyIDSMmZGe9XXPZWVKpjYDK9r7Mjh-PU3oIjs'
src='/images/personal-pics/beyza.jpg'
alt='Beyza avatar'
></img>
<h3 className='mt-1 text-lg font-semibold text-cyanaqua'>
Expand All @@ -183,8 +183,8 @@ function AboutUsPage() {
{/* Hadri's Card */}
<div className='flex w-[200px] flex-col rounded-xl bg-[#585785] p-6 text-center align-middle duration-500 hover:shadow-xl hover:shadow-cyanaqua'>
<img
className='h-auto w-full rounded-full border-4 border-cyanaqua'
src='https://avatars.githubusercontent.com/u/68324184?v=4'
className='h-auto w-full rounded-full border-4 border-cyanaqua '
src='/images/personal-pics/momomo.jpeg'
alt='Hadri avatar'
></img>
<h3 className='mt-1 text-lg font-semibold text-cyanaqua'>
Expand Down
45 changes: 27 additions & 18 deletions src/pages/api/auth/[...nextauth].js
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
import NextAuth from "next-auth";
import GoogleProvider from "next-auth/providers/google";
// import NextAuth from "next-auth";
// import GitHubProvider from "next-auth/providers/github";

export default NextAuth({
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
],
callbacks: {
async signIn({ account, profile }) {
if (account.provider === "google") {
return profile.email_verified && profile.email.endsWith(".edu");
}
return true;
},
},
});
// export default NextAuth({
// providers: [
// GitHubProvider({
// clientId: process.env.GITHUB_ID,
// clientSecret: process.env.GITHUB_SECRET,
// profile(profile) {
// return {
// id: profile.id.toString(),
// name: profile.name || profile.login,
// email: profile.email,
// image: profile.avatar_url,
// };
// },
// }),
// ],
// callbacks: {
// async jwt({ token }) {
// token.userRole = "admin";
// return token;
// },
// },
// pages: {
// signIn: "/sign-in",
// },
// });
2 changes: 0 additions & 2 deletions src/pages/api/hello.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

// api example
export default function hello(req, res) {
res.status(200).json({ name: "api is working" });
Expand Down
9 changes: 9 additions & 0 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default function HomePage({ productsData }) {
const [minPrice, setMinPrice] = React.useState("");
const [currentCategory, setCurrentCategory] = React.useState("");

// const { data: session } = useSession();

return (
<>
<Layout
Expand Down Expand Up @@ -54,6 +56,13 @@ export default function HomePage({ productsData }) {
</Layout>
</>
);

// return (
// <>
// Not signed in <br />
// <button onClick={() => signIn()}>Sign in</button>
// </>
// );
}

export const API_URL = process.env.NEXT_PUBLIC_API_URL || "http://0.0.0.0:3001";
Expand Down
76 changes: 44 additions & 32 deletions src/pages/sign-in.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,38 +141,7 @@ export default function SignInPage() {
{t("sign-in-with")}
</p>
</div>
<div className='m-1 mb-1 hidden md:hidden lg:mb-12 lg:flex lg:flex-row lg:justify-around'>
<button className=' m-1 flex items-center rounded-3xl border border-[#F26F6F] p-1 text-[#F26F6F]'>
<BsGoogle
size={22}
style={{ padding: "1px" }}
color='#F26F6F'
/>
<p className='mx-2 text-sm md:mx-3'>
Google
</p>
</button>
<button className='color-darkPurple m-1 flex items-center rounded-3xl border border-darkPurple p-1 text-darkPurple'>
<BsFacebook
size={22}
style={{ padding: "1px" }}
color='#585785'
/>
<p className='mx-2 text-sm md:mx-3'>
Facebook
</p>
</button>
<button className=' m-1 flex justify-around rounded-3xl border border-[#1DA1F2] bg-transparent p-1 text-[#1DA1F2]'>
<BsTwitter
size={22}
style={{ padding: "1px" }}
color='#1DA1F2'
/>
<p className='mx-2 text-sm md:mx-3'>
Twitter
</p>
</button>
</div>

<div className='hidden items-center md:hidden lg:mb-8 lg:flex lg:flex-col'>
<p className=' text-md mb-3 bg-transparent text-darkpurple'>
{t("don't-have-an-account")}?
Expand All @@ -187,6 +156,47 @@ export default function SignInPage() {
</Link>
</div>
</form>
<div className='m-1 mb-1 hidden md:hidden lg:mb-12 lg:flex lg:flex-row lg:justify-around'>
<button className=' m-1 flex items-center rounded-3xl border border-[#F26F6F] p-1 text-[#F26F6F]'>
<BsGoogle
size={22}
style={{ padding: "1px" }}
color='#F26F6F'
/>
<p className='mx-2 text-sm md:mx-3'>
Google
</p>
</button>

<button
// onClick={(e) => {
// e.preventDefault();
// signIn("github");
// }}
className='color-darkPurple m-1 flex items-center rounded-3xl border border-darkPurple p-1 text-darkPurple'
>
<BsFacebook
size={22}
style={{ padding: "1px" }}
color='#585785'
/>

<p className='mx-2 text-sm md:mx-3'>
Facebook
</p>
</button>

<button className=' m-1 flex justify-around rounded-3xl border border-[#1DA1F2] bg-transparent p-1 text-[#1DA1F2]'>
<BsTwitter
size={22}
style={{ padding: "1px" }}
color='#1DA1F2'
/>
<p className='mx-2 text-sm md:mx-3'>
Twitter
</p>
</button>
</div>
</div>
</div>

Expand Down Expand Up @@ -227,6 +237,7 @@ export default function SignInPage() {
/>
<p className='mx-2 text-sm md:mx-3'>Google</p>
</button>

<button className='color-darkPurple m-1 flex items-center rounded-3xl border border-darkPurple p-1 text-darkPurple'>
<BsFacebook
size={22}
Expand All @@ -235,6 +246,7 @@ export default function SignInPage() {
/>
<p className='mx-2 text-sm md:mx-3'>Facebook</p>
</button>

<button className=' m-1 flex justify-around rounded-3xl border border-[#1DA1F2] bg-transparent p-1 text-[#1DA1F2]'>
<BsTwitter
size={22}
Expand Down

0 comments on commit a5828f0

Please sign in to comment.