Skip to content

Commit

Permalink
Merge pull request #24 from /issues/19
Browse files Browse the repository at this point in the history
Issues/19
  • Loading branch information
nasubi-dev authored Jun 15, 2024
2 parents cd7e8e3 + a7d2c3a commit d56627c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?
*.env
*.env.local
!.env.example
13 changes: 13 additions & 0 deletions src/pages/auth/callback.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Flex, Button, Text } from "@radix-ui/themes";

Check failure on line 1 in src/pages/auth/callback.tsx

View workflow job for this annotation

GitHub Actions / build

'Button' is declared but its value is never read.
import { type ReactElement } from "react";

export default function Page(): ReactElement {
const params = new URLSearchParams(window.location.search);
console.log(params);
return (
<Flex direction="column" gap="2">
<Text>こちらCallbackになります</Text>

</Flex>
);
}
15 changes: 15 additions & 0 deletions src/pages/auth/login.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Flex, Button, Text } from "@radix-ui/themes";
import { type ReactElement } from "react";

export default function Page(): ReactElement {
return (
<Flex direction="column" gap="2">
<Text>こちらログイン画面になります</Text>
<a
href={`https://api.esa.io/oauth/authorize?client_id=${import.meta.env.VITE_CLIENT_ID}&redirect_uri=${import.meta.env.VITE_REDIRECT_LOCAL_URI}&scope=read+write&response_type=code`}
>
<Button>Login</Button>
</a>
</Flex>
);
}
2 changes: 2 additions & 0 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export type Path =
| `/`
| `/achievements`
| `/achievements/:id`
| `/auth/callback`
| `/auth/login`
| `/create`
| `/members`
| `/members/:id`
Expand Down

0 comments on commit d56627c

Please sign in to comment.