-
Notifications
You must be signed in to change notification settings - Fork 7
Miryam/google drive #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Miryam/google drive #177
Conversation
Shoshana-Yudelevitz
left a comment
There was a problem hiding this 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; | ||
|
|
||
| //כרגע מעלה לדריב קובץ חסר משמהות |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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/> |
There was a problem hiding this comment.
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
הקובף שעולה לדריב זה קובץ TXT שיצרתי בתוך הקומפוננטה!
תגידי לי איך את רוצה שאני יקבל את הקובץ ואני ישנה את זה!
(האם לקבל רק נתונים כ-props וליצור אותם בתוך קובץ או אולי לקבל קובץ....)