diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json
index a5d738d..40d70ca 100644
--- a/public/locales/en/translation.json
+++ b/public/locales/en/translation.json
@@ -18,6 +18,10 @@
},
"routes": {
+ "OverviewRoute": {
+ "title": "Overview",
+ "description": "Not much to see here, yet."
+ },
"LoginRoute": {
"forms": {
"email": {
diff --git a/src/App.tsx b/src/App.tsx
index e195c5d..dbbc611 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -24,6 +24,7 @@ import SettingsRoute from "~/routes/SettingsRoute"
import SignupRoute from "~/routes/SignupRoute"
import VerifyEmailRoute from "~/routes/VerifyEmailRoute"
+import OverviewRoute from "~/routes/OverviewRoute"
import "./init-i18n"
const router = createBrowserRouter([
@@ -65,6 +66,10 @@ const router = createBrowserRouter([
path: "/",
element: ,
children: [
+ {
+ path: "/",
+ element: ,
+ },
{
loader: getServerSettings,
path: "/aliases",
diff --git a/src/apis/change-allow-email-login-from-different-devices.ts b/src/apis/change-allow-email-login-from-different-devices.ts
index f7fab05..5b17973 100644
--- a/src/apis/change-allow-email-login-from-different-devices.ts
+++ b/src/apis/change-allow-email-login-from-different-devices.ts
@@ -15,7 +15,7 @@ export default async function changeAllowEmailLoginFromDifferentDevices({
const {data} = await client.patch(
`${
import.meta.env.VITE_SERVER_BASE_URL
- }/auth/login/email-token/allow-login-from-different-devices`,
+ }/v1/auth/login/email-token/allow-login-from-different-devices`,
{
email,
sameRequestToken,
diff --git a/src/apis/create-alias.ts b/src/apis/create-alias.ts
index 9e5b116..72f82f5 100644
--- a/src/apis/create-alias.ts
+++ b/src/apis/create-alias.ts
@@ -30,9 +30,13 @@ interface CreateAliasDataCustomType extends CreateAliasDataBase {
export type CreateAliasData = CreateAliasDataRandomType | CreateAliasDataCustomType
export default async function createAlias(aliasData: CreateAliasData): Promise {
- const {data} = await client.post(`${import.meta.env.VITE_SERVER_BASE_URL}/alias`, aliasData, {
- withCredentials: true,
- })
+ const {data} = await client.post(
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/alias`,
+ aliasData,
+ {
+ withCredentials: true,
+ },
+ )
return data
}
diff --git a/src/apis/delete-report.ts b/src/apis/delete-report.ts
index 540a29f..4c782cc 100644
--- a/src/apis/delete-report.ts
+++ b/src/apis/delete-report.ts
@@ -2,7 +2,7 @@ import {SimpleDetailResponse} from "~/server-types"
import {client} from "~/constants/axios-client"
export default async function deleteReport(id: string): Promise {
- const {data} = await client.delete(`${import.meta.env.VITE_SERVER_BASE_URL}/report/${id}`, {
+ const {data} = await client.delete(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/report/${id}`, {
withCredentials: true,
})
diff --git a/src/apis/get-alias.ts b/src/apis/get-alias.ts
index 656721a..775af6e 100644
--- a/src/apis/get-alias.ts
+++ b/src/apis/get-alias.ts
@@ -2,12 +2,9 @@ import {client} from "~/constants/axios-client"
import {Alias} from "~/server-types"
export default async function getAlias(address: string): Promise {
- const {data} = await client.get(
- `${import.meta.env.VITE_SERVER_BASE_URL}/alias/${address}`,
- {
- withCredentials: true,
- },
- )
+ const {data} = await client.get(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/alias/${address}`, {
+ withCredentials: true,
+ })
return data
}
diff --git a/src/apis/get-aliases.ts b/src/apis/get-aliases.ts
index 923a4d1..64b907a 100644
--- a/src/apis/get-aliases.ts
+++ b/src/apis/get-aliases.ts
@@ -10,17 +10,14 @@ export default async function getAliases({
size,
page,
}: GetAliasesData): Promise> {
- const {data} = await client.get(
- `${import.meta.env.VITE_SERVER_BASE_URL}/alias`,
- {
- withCredentials: true,
- params: {
- query,
- size,
- page,
- },
+ const {data} = await client.get(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/alias`, {
+ withCredentials: true,
+ params: {
+ query,
+ size,
+ page,
},
- )
+ })
return data
}
diff --git a/src/apis/get-report.ts b/src/apis/get-report.ts
index 9112c3b..93d3c31 100644
--- a/src/apis/get-report.ts
+++ b/src/apis/get-report.ts
@@ -2,12 +2,9 @@ import {client} from "~/constants/axios-client"
import {Report} from "~/server-types"
export default async function getReport(id: string): Promise {
- const {data} = await client.get(
- `${import.meta.env.VITE_SERVER_BASE_URL}/report/${id}`,
- {
- withCredentials: true,
- },
- )
+ const {data} = await client.get(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/report/${id}`, {
+ withCredentials: true,
+ })
return data
}
diff --git a/src/apis/get-reports.ts b/src/apis/get-reports.ts
index 821089d..c95d778 100644
--- a/src/apis/get-reports.ts
+++ b/src/apis/get-reports.ts
@@ -2,12 +2,9 @@ import {PaginationResult, Report} from "~/server-types"
import {client} from "~/constants/axios-client"
export default async function getReports(): Promise> {
- const {data} = await client.get(
- `${import.meta.env.VITE_SERVER_BASE_URL}/report`,
- {
- withCredentials: true,
- },
- )
+ const {data} = await client.get(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/report`, {
+ withCredentials: true,
+ })
return data
}
diff --git a/src/apis/get-server-settings.ts b/src/apis/get-server-settings.ts
index b48517c..1a9eb04 100644
--- a/src/apis/get-server-settings.ts
+++ b/src/apis/get-server-settings.ts
@@ -2,7 +2,5 @@ import {ServerSettings} from "~/server-types"
import {client} from "~/constants/axios-client"
export default async function getServerSettings(): Promise {
- return (
- await client.get(`${import.meta.env.VITE_SERVER_BASE_URL}/settings`)
- ).data
+ return (await client.get(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/settings`)).data
}
diff --git a/src/apis/login-with-email.ts b/src/apis/login-with-email.ts
index f3a4e95..ef03c01 100644
--- a/src/apis/login-with-email.ts
+++ b/src/apis/login-with-email.ts
@@ -5,11 +5,9 @@ export interface LoginWithEmailResult {
sameRequestToken: string
}
-export default async function loginWithEmail(
- email: string,
-): Promise {
+export default async function loginWithEmail(email: string): Promise {
const {data} = await client.post(
- `${import.meta.env.VITE_SERVER_BASE_URL}/auth/login/email-token`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/login/email-token`,
{
email,
},
diff --git a/src/apis/logout.ts b/src/apis/logout.ts
index a12ad95..31fe8d1 100644
--- a/src/apis/logout.ts
+++ b/src/apis/logout.ts
@@ -1,10 +1,8 @@
-import {MinimumServerResponse} from "~/server-types"
import {client} from "~/constants/axios-client"
+import {SimpleDetailResponse} from "~/server-types"
export default async function logout(): Promise {
- const {data} = await client.post(
- `${import.meta.env.VITE_SERVER_BASE_URL}/auth/logout`,
- )
+ const {data} = await client.post(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/logout`)
return data
}
diff --git a/src/apis/refresh-token.ts b/src/apis/refresh-token.ts
index 674c129..9e6404c 100644
--- a/src/apis/refresh-token.ts
+++ b/src/apis/refresh-token.ts
@@ -6,9 +6,7 @@ export interface RefreshTokenResult {
detail: string
}
-export const REFRESH_TOKEN_URL = `${
- import.meta.env.VITE_SERVER_BASE_URL
-}/auth/refresh`
+export const REFRESH_TOKEN_URL = `${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/refresh`
export default async function refreshToken(): Promise {
const {data} = await client.post(REFRESH_TOKEN_URL)
diff --git a/src/apis/resend-email-login-code.ts b/src/apis/resend-email-login-code.ts
index 374345e..97381ff 100644
--- a/src/apis/resend-email-login-code.ts
+++ b/src/apis/resend-email-login-code.ts
@@ -11,9 +11,7 @@ export default async function resendEmailLoginCode({
sameRequestToken,
}: ResendEmailLoginCodeData): Promise {
const {data} = await client.post(
- `${
- import.meta.env.VITE_SERVER_BASE_URL
- }/auth/login/email-token/resend-email`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/login/email-token/resend-email`,
{
email,
sameRequestToken,
diff --git a/src/apis/resend-email-verification-code.ts b/src/apis/resend-email-verification-code.ts
index 4682c5f..67f90ae 100644
--- a/src/apis/resend-email-verification-code.ts
+++ b/src/apis/resend-email-verification-code.ts
@@ -5,7 +5,7 @@ export default async function resendEmailVerificationCode(
email: string,
): Promise {
const {data} = await client.post(
- `${import.meta.env.VITE_SERVER_BASE_URL}/auth/resend-email`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/resend-email`,
{
email,
},
diff --git a/src/apis/signup.ts b/src/apis/signup.ts
index 76f7f09..6ab2667 100644
--- a/src/apis/signup.ts
+++ b/src/apis/signup.ts
@@ -5,12 +5,9 @@ export interface SignupResult {
}
export default async function signup(email: string): Promise {
- const {data} = await client.post(
- `${import.meta.env.VITE_SERVER_BASE_URL}/auth/signup`,
- {
- email,
- },
- )
+ const {data} = await client.post(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/signup`, {
+ email,
+ })
return data
}
diff --git a/src/apis/update-account.ts b/src/apis/update-account.ts
index 0e11383..5961783 100644
--- a/src/apis/update-account.ts
+++ b/src/apis/update-account.ts
@@ -13,7 +13,7 @@ export default async function updateAccount(
updateData: UpdateAccountData,
): Promise {
const {data} = await client.patch(
- `${import.meta.env.VITE_SERVER_BASE_URL}/account`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/account`,
updateData,
{
withCredentials: true,
diff --git a/src/apis/update-alias.ts b/src/apis/update-alias.ts
index 2937755..03c35b3 100644
--- a/src/apis/update-alias.ts
+++ b/src/apis/update-alias.ts
@@ -13,7 +13,7 @@ export interface UpdateAliasData {
export default async function updateAlias(id: string, updateData: UpdateAliasData): Promise {
const {data} = await client.patch(
- `${import.meta.env.VITE_SERVER_BASE_URL}/alias/${id}`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/alias/${id}`,
updateData,
{
withCredentials: true,
diff --git a/src/apis/update-preferences.ts b/src/apis/update-preferences.ts
index d552019..995582d 100644
--- a/src/apis/update-preferences.ts
+++ b/src/apis/update-preferences.ts
@@ -13,7 +13,7 @@ export default async function updatePreferences(
updateData: UpdatePreferencesData,
): Promise {
const {data} = await client.patch(
- `${import.meta.env.VITE_SERVER_BASE_URL}/preferences`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/preferences`,
updateData,
{
withCredentials: true,
diff --git a/src/apis/verify-email.ts b/src/apis/verify-email.ts
index 2bd637a..89ca3ad 100644
--- a/src/apis/verify-email.ts
+++ b/src/apis/verify-email.ts
@@ -12,7 +12,7 @@ export default async function verifyEmail({
token,
}: VerifyEmailData): Promise {
const {data} = await client.post(
- `${import.meta.env.VITE_SERVER_BASE_URL}/auth/verify-email`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/verify-email`,
{
email: email,
token: token,
diff --git a/src/apis/verify-login-with-email.ts b/src/apis/verify-login-with-email.ts
index 84bc899..229204e 100644
--- a/src/apis/verify-login-with-email.ts
+++ b/src/apis/verify-login-with-email.ts
@@ -14,7 +14,7 @@ export default async function verifyLoginWithEmail({
sameRequestToken,
}: VerifyLoginWithEmailData): Promise {
const {data} = await client.post(
- `${import.meta.env.VITE_SERVER_BASE_URL}/auth/login/email-token/verify`,
+ `${import.meta.env.VITE_SERVER_BASE_URL}/v1/auth/login/email-token/verify`,
{
email,
token,
diff --git a/src/route-widgets/AuthenticateRoute/NavigationButton.tsx b/src/route-widgets/AuthenticateRoute/NavigationButton.tsx
index e5a9a90..97a7f7b 100644
--- a/src/route-widgets/AuthenticateRoute/NavigationButton.tsx
+++ b/src/route-widgets/AuthenticateRoute/NavigationButton.tsx
@@ -3,11 +3,12 @@ import {BiStats} from "react-icons/bi"
import {MdSettings} from "react-icons/md"
import {FaMask} from "react-icons/fa"
import {Link as RouterLink, useLocation} from "react-router-dom"
+import {useTranslation} from "react-i18next"
import {Button} from "@mui/material"
import {mdiTextBoxMultiple} from "@mdi/js/commonjs/mdi"
-import {useTranslation} from "react-i18next"
import Icon from "@mdi/react"
+
import LockNavigationContext from "~/LockNavigationContext/LockNavigationContext"
export enum NavigationSection {
@@ -42,9 +43,7 @@ const PATH_SECTION_MAP: Record = {
settings: NavigationSection.Settings,
}
-export default function NavigationButton({
- section,
-}: NavigationButtonProps): ReactElement {
+export default function NavigationButton({section}: NavigationButtonProps): ReactElement {
const {t} = useTranslation()
const {handleAnchorClick} = useContext(LockNavigationContext)
const location = useLocation()
@@ -61,9 +60,8 @@ export default function NavigationButton({
startIcon={Icon}
component={RouterLink}
to={
- Object.keys(PATH_SECTION_MAP).find(
- path => PATH_SECTION_MAP[path] === section,
- ) ?? "/"
+ Object.keys(PATH_SECTION_MAP).find(path => PATH_SECTION_MAP[path] === section) ??
+ "/"
}
onClick={handleAnchorClick}
>
diff --git a/src/routes/OverviewRoute.tsx b/src/routes/OverviewRoute.tsx
new file mode 100644
index 0000000..f80e909
--- /dev/null
+++ b/src/routes/OverviewRoute.tsx
@@ -0,0 +1,20 @@
+import {ReactElement} from "react"
+import {useTranslation} from "react-i18next"
+
+import {Grid, Typography} from "@mui/material"
+
+import {SimplePage} from "~/components"
+
+export default function OverviewRoute(): ReactElement {
+ const {t} = useTranslation()
+
+ return (
+
+
+
+ {t("routes.OverviewRoute.description")}
+
+
+
+ )
+}