Skip to content

Commit 5f76060

Browse files
committed
Add comment, return null
1 parent 9cfc379 commit 5f76060

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

plugins/google-sheets/src/pages/Authenticate.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export function Authenticate({ onAuthenticated }: AuthenticationProps) {
8181
<span className="pl-[10px]">Map the column fields to the CMS</span>
8282
</li>
8383
</ol>
84+
{/* Don't disable button because we want to allow the user to reopen the log in page if they close it without finishing */}
8485
<button onClick={login} className="flex flex-row gap-[8px]">
8586
{isLoading ? (
8687
<div className="framer-spinner" />

plugins/google-sheets/src/pages/SelectSheet.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function SelectSheetPage({ onError, onSheetSelected }: Props) {
1717
const [selectedSheetTitle, setSelectedSheetTitle] = useState<string>("")
1818

1919
const selectedSpreadsheetId = useMemo(() => {
20-
if (!spreadsheetUrl) return ""
20+
if (!spreadsheetUrl) return null
2121

2222
try {
2323
const url = new URL(spreadsheetUrl)
@@ -27,15 +27,15 @@ export function SelectSheetPage({ onError, onSheetSelected }: Props) {
2727

2828
return id
2929
} catch (err) {
30-
return ""
30+
return null
3131
}
3232
}, [spreadsheetUrl])
3333

3434
const {
3535
data: spreadsheetInfo,
3636
isFetching: isFetchingSheets,
3737
isError: isSpreadSheetInfoError,
38-
} = useSpreadsheetInfoQuery(selectedSpreadsheetId)
38+
} = useSpreadsheetInfoQuery(selectedSpreadsheetId ?? "")
3939

4040
useEffect(() => {
4141
if (isSpreadSheetInfoError) {

0 commit comments

Comments
 (0)