Skip to content

Commit 4189ec1

Browse files
committed
fix
0 parents  commit 4189ec1

39 files changed

+1250
-0
lines changed

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
KINDE_CLIENT_ID = d4748ea1b2dd43ee98c3f3728c890c23
2+
KINDE_CLIENT_SECRET = gfHPLaOkh0TuTmaYTT4OK1jDlWV4IGYgpdd0sjl3ZYgRS2PfAMu
3+
KINDE_ISSUER_URL = https://auth.mikn.dev
4+
KINDE_SITE_URL=http://localhost:3000
5+
KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000
6+
KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/account

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

app/[lng]/account/page.tsx

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
"use client";
2+
import { useKindeBrowserClient } from "@kinde-oss/kinde-auth-nextjs";
3+
import { LoginLink, LogoutLink } from "@kinde-oss/kinde-auth-nextjs/components";
4+
import { Card, Heading, Button, Center } from "@neodyland/ui";
5+
import { useClientTranslation } from "@/app/i18n/client";
6+
import { PinContainer } from "@/app/ui/pin";
7+
import Loading from "@/app/ui/spinner";
8+
import Image from "next/image";
9+
10+
import mikanMascot from "@/app/assets/MikanMascotFull.png";
11+
12+
interface Props {
13+
params: {
14+
lng: string;
15+
};
16+
}
17+
18+
export default function Home({ params: { lng } }: Props) {
19+
const { t } = useClientTranslation(lng, "acc");
20+
const en = lng.split("-")[0] === "en";
21+
const { isAuthenticated, isLoading } = useKindeBrowserClient();
22+
23+
if (isLoading)
24+
return (
25+
<div>
26+
{" "}
27+
<Card>
28+
<Heading
29+
size="4xl"
30+
className="flex justify-center items-center mb-10"
31+
>
32+
{t("load")}
33+
</Heading>
34+
<Loading size="lg" />
35+
</Card>
36+
</div>
37+
);
38+
39+
return isAuthenticated ? (
40+
<div>
41+
<Card>
42+
<Heading
43+
size="4xl"
44+
className="flex justify-center items-center mb-5"
45+
>
46+
MikanDev Account
47+
</Heading>
48+
<Heading
49+
size="sm"
50+
className="flex justify-center items-center mb-5"
51+
>
52+
{t("logged_in")}
53+
</Heading>
54+
<Center>
55+
<LogoutLink>
56+
<Button colorScheme="primary" size="lg">
57+
{t("buttons.logout")}
58+
</Button>
59+
</LogoutLink>
60+
</Center>
61+
</Card>
62+
</div>
63+
) : (
64+
<div>
65+
<Card className="mb-20">
66+
<Heading
67+
size="4xl"
68+
className="flex justify-center items-center mb-5"
69+
>
70+
MikanDev Account
71+
</Heading>
72+
<Heading
73+
size="sm"
74+
className="flex justify-center items-center mb-5"
75+
>
76+
{t("pls_login")}
77+
</Heading>
78+
<Center>
79+
<LoginLink>
80+
<Button colorScheme="primary" size="lg">
81+
{t("buttons.login")}
82+
</Button>
83+
</LoginLink>
84+
</Center>
85+
</Card>
86+
<LoginLink>
87+
<PinContainer title={t("blurb3")}>
88+
<div className="flex basis-full flex-col p-4 justify-center items-center text-slate-100 sm:basis-1/2 w-[20rem] h-[20rem] ">
89+
<h3 className="max-w-xs !pb-2 !m-0 font-bold text-slate-100">
90+
{t("blurb1")}
91+
</h3>
92+
<div className="justify-center items-center">
93+
<span className="text-slate-100">
94+
{t("blurb2")}
95+
</span>
96+
</div>
97+
<Image
98+
src={mikanMascot.src}
99+
width={200}
100+
height={100}
101+
alt="MikanDev Tech Logo"
102+
className="ml-2 mb-0 mt-10"
103+
/>
104+
</div>
105+
</PinContainer>
106+
</LoginLink>
107+
</div>
108+
);
109+
}

app/[lng]/page.tsx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"use client";
2+
import { TypewriterEffect } from "../ui/type";
3+
import { useClientTranslation } from "../i18n/client";
4+
import { Button, Heading } from "@neodyland/ui";
5+
6+
interface Props {
7+
params: {
8+
lng: string;
9+
};
10+
}
11+
12+
export default function Home({ params: { lng } }: Props) {
13+
const { t } = useClientTranslation(lng, "index");
14+
const en = lng.split("-")[0] === "en";
15+
16+
const words = [
17+
{
18+
text: t("Sweet"),
19+
},
20+
{
21+
text: t("And"),
22+
},
23+
{
24+
text: t("Juicy"),
25+
className: "text-orange-500 dark:text-orange-500",
26+
},
27+
];
28+
29+
return (
30+
<>
31+
<div className="relative">
32+
<TypewriterEffect words={words} className="mt-20" />
33+
<Heading className="flex justify-center items-center">
34+
Test
35+
</Heading>
36+
<Button>{t("buttons.click_me")}</Button>
37+
</div>
38+
</>
39+
);
40+
}

0 commit comments

Comments
 (0)