-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from wajeshubham/firebase
Firebase configuration
- Loading branch information
Showing
28 changed files
with
1,427 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} | ||
"extends": "next/core-web-vitals", | ||
"rules": { | ||
"@next/next/no-img-element": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
/.pnp | ||
.pnp.js | ||
|
||
.env | ||
|
||
# testing | ||
/coverage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from "react"; | ||
import Button, { SnippngButtonType } from "./form/Button"; | ||
import { FolderPlusIcon } from "@heroicons/react/24/outline"; | ||
|
||
interface Props { | ||
errorTitle: string; | ||
errorSubTitle?: string; | ||
errorActionProps?: SnippngButtonType; | ||
ErrorIcon?: ((props: React.SVGProps<SVGSVGElement>) => JSX.Element) | null; | ||
} | ||
|
||
const ErrorText: React.FC<Props> = ({ | ||
errorTitle, | ||
errorSubTitle, | ||
errorActionProps, | ||
ErrorIcon, | ||
}) => { | ||
return ( | ||
<div className="text-center py-8"> | ||
{ErrorIcon ? ( | ||
<ErrorIcon className="mx-auto h-12 w-12 text-zinc-400" /> | ||
) : ( | ||
<FolderPlusIcon className="mx-auto h-12 w-12 text-zinc-400" /> | ||
)} | ||
<h3 className="mt-2 text-sm font-medium dark:text-white text-zinc-900"> | ||
{errorTitle} | ||
</h3> | ||
{errorSubTitle ? ( | ||
<p className="mt-1 text-sm dark:text-zinc-400 text-zinc-500"> | ||
{errorSubTitle} | ||
</p> | ||
) : null} | ||
{errorActionProps ? ( | ||
<div className="mt-6"> | ||
<Button {...errorActionProps}>{errorActionProps.children}</Button> | ||
</div> | ||
) : null} | ||
</div> | ||
); | ||
}; | ||
|
||
export default ErrorText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
|
||
const Loader = () => { | ||
return ( | ||
<div className="flex space-x-2 w-full h-screen fixed inset-0 bg-zinc-700/50 z-30 justify-center items-center"> | ||
<div aria-label="Loading..." role="status"> | ||
<svg className="h-12 w-12 animate-spin" viewBox="3 3 18 18"> | ||
<path | ||
className="fill-gray-200" | ||
d="M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z" | ||
></path> | ||
<path | ||
className="fill-gray-800" | ||
d="M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z" | ||
></path> | ||
</svg> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Loader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { useAuth } from "@/context/AuthContext"; | ||
import React from "react"; | ||
import Button from "./form/Button"; | ||
import GithubIcon from "./icons/GithubIcon"; | ||
|
||
const SigninButton = () => { | ||
const { loginWithGithub } = useAuth(); | ||
|
||
return ( | ||
<Button onClick={loginWithGithub}> | ||
<GithubIcon className="inline-flex mr-1" /> | ||
Signin | ||
</Button> | ||
); | ||
}; | ||
|
||
export default SigninButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { clsx } from "@/utils"; | ||
import React from "react"; | ||
|
||
interface Props extends React.InputHTMLAttributes<HTMLInputElement> { | ||
label?: string; | ||
containerClassName?: string; | ||
} | ||
|
||
const Input: React.FC<Props> = ({ label, containerClassName, ...props }) => { | ||
return ( | ||
<div className="flex flex-col"> | ||
{label ? ( | ||
<label | ||
className="text-sm my-0.5 dark:text-white text-zinc-900" | ||
htmlFor={props.id} | ||
> | ||
{label} | ||
</label> | ||
) : null} | ||
<input | ||
{...props} | ||
className={clsx( | ||
"w-full dark:bg-zinc-700 placeholder:dark:text-zinc-400 block px-2 py-1.5 bg-zinc-100 border-[1px] dark:border-zinc-400 border-zinc-300 dark:text-white text-zinc-900 outline-none rounded-sm", | ||
props.className ?? "" | ||
)} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
|
||
const GithubIcon: React.FC<React.SVGAttributes<SVGSVGElement>> = ({ | ||
...props | ||
}) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="24" | ||
height="24" | ||
viewBox="0 0 28 28" | ||
{...props} | ||
> | ||
<path | ||
className="dark:fill-white fill-black" | ||
d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default GithubIcon; |
Oops, something went wrong.