diff --git a/.env.example b/.env.example index 3283ce2..380a2ef 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ TWITTER_CLIENT_ID=your_oauth2_client_id TWITTER_CLIENT_SECRET=your_oauth2_client_secret -# Twitter OAuth 1.0a credentials (for user context endpoints) +# Twitter OAuth 1.0a credentials (for user context endpoints and media uploads) TWITTER_API_KEY=your_oauth1_api_key TWITTER_API_SECRET=your_oauth1_api_secret TWITTER_ACCESS_TOKEN=your_oauth1_access_token diff --git a/.github/workflows/near-rewards.yml b/.github/workflows/near-rewards.yml new file mode 100644 index 0000000..16ed2b3 --- /dev/null +++ b/.github/workflows/near-rewards.yml @@ -0,0 +1,28 @@ +name: NEAR Protocol Rewards Tracking +on: + schedule: + - cron: '0 */12 * * *' # Every 12 hours + workflow_dispatch: # Manual trigger + push: + branches: [ main ] # Start on main branch updates + +jobs: + calculate-rewards: + runs-on: ubuntu-latest + permissions: + contents: read + issues: read + pull-requests: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Calculate Rewards + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPO: ${{ github.repository }} + run: | + npm install -g near-protocol-rewards@latest + near-protocol-rewards calculate \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index ee4e116..e2b3109 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/next.config.js b/next.config.js index aaf5862..db86e1f 100644 --- a/next.config.js +++ b/next.config.js @@ -7,6 +7,10 @@ const nextConfig = { protocol: "https", hostname: "builders.mypinata.cloud", }, + { + protocol: "https", + hostname: "ipfs.near.social", + }, ], }, }; diff --git a/package.json b/package.json index ec60a64..43c3550 100644 --- a/package.json +++ b/package.json @@ -39,24 +39,33 @@ "@near-wallet-selector/modal-ui": "^8.9.13", "@near-wallet-selector/my-near-wallet": "^8.9.13", "@radix-ui/react-dialog": "^1.1.4", + "@radix-ui/react-select": "^2.1.4", "@radix-ui/react-slot": "^1.1.1", + "@radix-ui/react-toast": "^1.2.4", + "@radix-ui/react-tooltip": "^1.1.6", + "@radix-ui/react-visually-hidden": "^1.1.1", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cookie": "^1.0.2", "date-fns": "^4.1.0", + "formidable": "^3.5.2", "framer-motion": "^11.16.1", + "lodash": "^4.17.21", "lucide-react": "^0.469.0", "near-api-js": "^4.0.3", "next": "14.2.13", "react": "^18", "react-beautiful-dnd": "^13.1.1", + "react-confetti": "^6.2.2", "react-dom": "^18", + "react-markdown": "^9.0.3", "tailwind-merge": "^2.6.0", "tailwindcss-animate": "^1.0.7", "twitter-api-v2": "^1.19.0" }, "devDependencies": { "@builddao/near-social-js": "1.1.0-beta.6", + "@tailwindcss/typography": "^0.5.16", "autoprefixer": "^10.4.20", "encoding": "^0.1.13", "eslint": "^8", diff --git a/public/og-image.png b/public/og-image.png new file mode 100644 index 0000000..90ff9ed Binary files /dev/null and b/public/og-image.png differ diff --git a/public/og-image.svg b/public/og-image.svg deleted file mode 100644 index 9caf851..0000000 --- a/public/og-image.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - crosspost - - - - - your content, everywhere - - diff --git a/src/components/compose-post.js b/src/components/compose-post.js index e9506d3..6660fa6 100644 --- a/src/components/compose-post.js +++ b/src/components/compose-post.js @@ -1,10 +1,6 @@ -import { useState, useEffect } from "react"; -import { useDraftsStore } from "../store/drafts-store"; -import { DraftsModal } from "./drafts-modal"; -import { Button } from "./ui/button"; import { - DndContext, closestCenter, + DndContext, KeyboardSensor, PointerSensor, useSensor, @@ -14,88 +10,31 @@ import { arrayMove, SortableContext, sortableKeyboardCoordinates, - useSortable, verticalListSortingStrategy, } from "@dnd-kit/sortable"; -import { CSS } from "@dnd-kit/utilities"; - -function SortablePost({ post, index, onTextChange, onRemove }) { - const { - attributes, - listeners, - setNodeRef, - transform, - transition, - isDragging, - } = useSortable({ id: `post-${index}` }); - - const style = { - transform: CSS.Transform.toString(transform), - transition, - opacity: isDragging ? 0.5 : 1, - }; - - return ( -
-
-
- - - - - - - - -
-
-
-