Skip to content

Commit

Permalink
fix(dashboard): fix only having dropbox auth to toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Oct 14, 2024
1 parent 81ba0f4 commit 6c9b3ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/dashboard/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Head from 'next/head';
import { useEffect, useState } from 'react';

import Button from '../components/button';
import DropboxButton from '../components/dropboxButton';
import Dropdown, { DropdownItem } from '../components/dropdown';
import GoogleButton from '../components/googleButton';
import Link from '../components/link';
Expand All @@ -21,7 +22,6 @@ import Toggle from '../components/toggle';
import prisma from '../lib/prisma';
import { getAvatarUrl, parseUser } from '../utils';
import { DiscordUser } from '../utils/types';
import DropboxButton from '../components/dropboxButton';

interface Props {
user: DiscordUser;
Expand Down Expand Up @@ -130,7 +130,10 @@ export default function Index(props: Props) {
);
const [driveService, setDriveService] = useState(props.drive.service ?? 'google');

const driveCanEnable = (driveService === 'google' && props.googleDrive) || (driveService === 'onedrive' && props.microsoft);
const driveCanEnable =
(driveService === 'google' && props.googleDrive) ||
(driveService === 'onedrive' && props.microsoft) ||
(driveService === 'dropbox' && props.dropbox);

const benefitDate = new Date(Date.now() + 1000 * 60 * 60);
benefitDate.setMinutes(0);
Expand Down

0 comments on commit 6c9b3ca

Please sign in to comment.