-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into base-errors
- Loading branch information
Showing
1,256 changed files
with
59,203 additions
and
80,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,5 @@ persisted_queries.json | |
|
||
# eslint | ||
.eslintcache | ||
|
||
.vercel |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
node_modules/ | ||
docs/dist/ | ||
docs/build/ | ||
./vocs.config.tsx.timestamp* | ||
|
||
# Yarn | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# Environment variables | ||
.env*.local | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
# Base Docs | ||
|
||
This the Docusaurus app for the Base docs. You can run the dev server locally with `yarn workspace @app/base-docs dev`. | ||
This is a [Vocs](https://vocs.dev) project bootstrapped with the Vocs CLI. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { google } from '@googleapis/sheets'; | ||
import type { VercelRequest, VercelResponse } from '@vercel/node'; | ||
|
||
// Initialize Google Sheets client | ||
const getGoogleSheetsClient = () => { | ||
try { | ||
const credentials = JSON.parse( | ||
Buffer.from(process.env.GOOGLE_SERVICE_ACCOUNT_KEY || '', 'base64').toString(), | ||
); | ||
|
||
const auth = new google.auth.GoogleAuth({ | ||
credentials, | ||
scopes: ['https://www.googleapis.com/auth/spreadsheets'], | ||
}); | ||
|
||
return google.sheets({ version: 'v4', auth }); | ||
} catch (error) { | ||
console.error('Failed to initialize Google Sheets client:', error); | ||
throw new Error('Failed to initialize Google Sheets client'); | ||
} | ||
}; | ||
|
||
type FeedbackPayload = { | ||
likeOrDislike: boolean; | ||
options: string[]; | ||
comment: string; | ||
url: string; | ||
ipAddress: string; | ||
timestamp: number; | ||
}; | ||
|
||
export default async function handler(req: VercelRequest, res: VercelResponse) { | ||
if (req.method !== 'POST') { | ||
return res.status(405).json({ error: 'Method not allowed' }); | ||
} | ||
|
||
try { | ||
const { likeOrDislike, options, comment, url, ipAddress, timestamp } = | ||
req.body as FeedbackPayload; | ||
|
||
const sheets = getGoogleSheetsClient(); | ||
const spreadsheetId = process.env.GOOGLE_SHEETS_ID; | ||
|
||
if (!spreadsheetId) { | ||
throw new Error('GOOGLE_SHEETS_ID environment variable is not set'); | ||
} | ||
|
||
// Format the row data | ||
const rowData = [ | ||
new Date(timestamp).toISOString(), | ||
url, | ||
ipAddress, | ||
likeOrDislike ? 'Like' : 'Dislike', | ||
options.join(', '), | ||
comment, | ||
]; | ||
|
||
// Append the row to the sheet | ||
await sheets.spreadsheets.values.append({ | ||
spreadsheetId, | ||
range: 'Sheet1!A:F', // Adjust range based on your sheet's structure | ||
valueInputOption: 'USER_ENTERED', | ||
requestBody: { | ||
values: [rowData], | ||
}, | ||
}); | ||
|
||
return res.status(200).json({ success: true }); | ||
} catch (error) { | ||
console.error('Error submitting feedback:', error); | ||
return res.status(500).json({ error: 'Failed to submit feedback' }); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file removed
BIN
-234 KB
apps/base-docs/assets/images/onchainkit-tutorials/swapped-theme-before.png
Binary file not shown.
Binary file removed
BIN
-217 KB
apps/base-docs/assets/images/onchainkit-tutorials/swapped-theme-final.png
Binary file not shown.
Binary file removed
BIN
-154 KB
apps/base-docs/assets/images/paymaster-tutorials/basescan-token-transfer.png
Binary file not shown.
Binary file removed
BIN
-131 KB
apps/base-docs/assets/images/paymaster-tutorials/cdp-copy-endpoint.png
Binary file not shown.
Binary file removed
BIN
-371 KB
apps/base-docs/assets/images/paymaster-tutorials/cdp-paymaster-config.png
Binary file not shown.
Binary file removed
BIN
-417 KB
apps/base-docs/assets/images/paymaster-tutorials/cdp-policy-settings.png
Binary file not shown.
Binary file removed
BIN
-45 KB
apps/base-docs/assets/images/paymaster-tutorials/connect-wallet-mint-page.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-140 KB
apps/base-docs/assets/images/paymaster-tutorials/sponsored_mint_nft.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-444 KB
apps/base-docs/assets/images/paymaster-tutorials/wallet-nft-page.png
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.