Skip to content

Conversation

@MiryamGabay
Copy link
Collaborator

הקובף שעולה לדריב זה קובץ TXT שיצרתי בתוך הקומפוננטה!
תגידי לי איך את רוצה שאני יקבל את הקובץ ואני ישנה את זה!
(האם לקבל רק נתונים כ-props וליצור אותם בתוך קובץ או אולי לקבל קובץ....)

Copy link
Collaborator

@Shoshana-Yudelevitz Shoshana-Yudelevitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

גוגל דריב -מרים

onSuccess: async (tokenResponse) => {
const accessToken = tokenResponse.access_token;

//כרגע מעלה לדריב קובץ חסר משמהות
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change it to got the file from props

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the file should come from props

},
}
);
console.log('File uploaded:', response.data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove console logs

import { store } from './redux/store.jsx';
import { SnackbarProvider } from 'notistack';
import './App.scss';
import { GoogleOAuthProvider } from '@react-oauth/google';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-order the imports

},
(error) => {
if (error.response.status === 401) {
window.location.href = '/login';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what means this window.location?

const ManagerGoogleDrive = () => {
const fileContent = "Hello, world!";
const fileName = 'yourfile.txt';
const fileMimeType = 'text/plain';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this hard-coded values?

},
{
path: '/reports',
element: <ManagerGoogleDrive/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not the reports UI, this should be only a button inside the reports page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants