Skip to content

Commit

Permalink
use a tag to open share url
Browse files Browse the repository at this point in the history
  • Loading branch information
duanyytop committed Nov 27, 2023
1 parent 59c96b7 commit 96ee838
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- name: Install dependency
run: pnpm install
- name: Build
run: pnpm lint
run: pnpm lint:fix
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"dev": "vite",
"test": "vitest",
"build": "tsc && vite build",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint \"src/*.{ts, tsx}\" --fix",
"lint:fix": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
Expand Down
10 changes: 3 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export default function App() {
webApp.showAlert && webApp.showAlert(message);
}

const onShare = () => {
openUrl("https://t.me/share?url=https://app.joy.id&text=JoyID Passkey Wallet");
};

useQuery(
[QueryKey.GetBotMessage, "connect"],
async () => {
Expand Down Expand Up @@ -221,9 +217,9 @@ export default function App() {
<button className="btn btn-primary capitalize w-[200px] mt-[30px]" onClick={() => onConnect()}>
{connectLoading ? <span className="loading loading-spinner loading-md" /> : "JoyID Passkey connect"}
</button>
<button className="btn btn-primary capitalize w-[200px] mt-[30px]" onClick={() => onShare()}>
{connectLoading ? <span className="loading loading-spinner loading-md" /> : "Share Url"}
</button>
<a className="btn btn-primary capitalize w-[200px] mt-[30px]" href="https://t.me/share?url=https%3A%2F%2Fapp.joy.id&text=JoyID%20Passkey%20Wallet">
Share Url
</a>
</div>
)}
</div>
Expand Down

0 comments on commit 96ee838

Please sign in to comment.