Skip to content

Commit

Permalink
Apple Sign in
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Jun 11, 2024
1 parent 35d88e9 commit fae1670
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions apps/dashboard/src/app/[locale]/(public)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ export default async function Page(params) {

let moreSignInOptions = null;
let preferredSignInOption =
device?.vendor === "Apple" ? <GoogleSignIn /> : <GoogleSignIn />;
device?.vendor === "Apple" ? (
<div className="flex flex-col space-y-2">
<GoogleSignIn />
<AppleSignIn />
</div>
) : (
<GoogleSignIn />
);

switch (preferred?.value) {
case "apple":
Expand Down Expand Up @@ -104,7 +111,6 @@ export default async function Page(params) {
if (device?.vendor === "Apple") {
moreSignInOptions = (
<>
<GoogleSignIn />
<SlackSignIn />
<GithubSignIn />
<OTPSignIn className="border-t-[1px] border-border pt-8" />
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/apple-sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function AppleSignIn() {
return (
<Button
onClick={handleSignIn}
className="active:scale-[0.98] rounded-md bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
className="active:scale-[0.98] bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
>
{isLoading ? (
<Loader2 className="h-4 w-4 animate-spin" />
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/github-sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function GithubSignIn() {
return (
<Button
onClick={handleSignIn}
className="active:scale-[0.98] rounded-md bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
className="active:scale-[0.98] bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
>
{isLoading ? (
<Loader2 className="h-4 w-4 animate-spin" />
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/google-sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function GoogleSignIn() {
return (
<Button
onClick={handleSignIn}
className="active:scale-[0.98] rounded-md bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
className="active:scale-[0.98] bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
>
{isLoading ? (
<Loader2 className="h-4 w-4 animate-spin" />
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/otp-sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function OTPSignIn({ className }: Props) {

<Button
type="submit"
className="active:scale-[0.98] rounded-md bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
className="active:scale-[0.98] bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
>
{isLoading ? (
<Loader2 className="h-4 w-4 animate-spin" />
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/slack-sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function SlackSignIn() {
return (
<Button
onClick={handleSignIn}
className="active:scale-[0.98] rounded-md bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
className="active:scale-[0.98] bg-primary px-6 py-4 text-secondary font-medium flex space-x-2 h-[40px] w-full"
>
{isLoading ? (
<Loader2 className="h-4 w-4 animate-spin" />
Expand Down

0 comments on commit fae1670

Please sign in to comment.