Skip to content

Commit

Permalink
Issue/8861 (#461)
Browse files Browse the repository at this point in the history
* 중간 커밋

* 중간 커밋

* 8861 이슈 처리

* name 수정

* error 처리 보강

---------

Co-authored-by: usbsync <[email protected]>
  • Loading branch information
kimorkim and usbsync authored Nov 27, 2024
1 parent 83089a6 commit e8dce60
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/components/popup/Contents/LoadWeb/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,20 @@ const Index = ({ type, loadWeb, HeaderButtonPortal }) => {

setSheetIdValid(null);

const response = await fetch(
// eslint-disable-next-line max-len
`https://docs.google.com/spreadsheets/d/${sheetId}/gviz/tq?tqx=out:csv&sheet=${sheetName}`
);
if (response.status !== 200) {
try {
const response = await fetch(
// eslint-disable-next-line max-len
`https://docs.google.com/spreadsheets/d/${sheetId}/gviz/tq?tqx=out:csv&sheet=${sheetName}`
);
if (response.status !== 200) {
setSheetIdValid(SheetIdValidMsg[1]);
return;
}
const csv = await response.text();
loadWeb(csv);
} catch (e) {
setSheetIdValid(SheetIdValidMsg[1]);
return;
}
const csv = await response.text();
loadWeb(csv);
};

return (
Expand Down

0 comments on commit e8dce60

Please sign in to comment.