Skip to content

Commit fc7ee9e

Browse files
committed
Change main routes for google indexing
1 parent ba2abfc commit fc7ee9e

File tree

9 files changed

+214
-224
lines changed

9 files changed

+214
-224
lines changed

app/about/page.tsx

Lines changed: 0 additions & 143 deletions
This file was deleted.

app/categories/page.tsx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
"use client";
2+
3+
import { Grid2, useMediaQuery, useTheme } from "@mui/material";
4+
import { CreateCategoryButton, CategoriesList } from "@/components/categories";
5+
import { SearchInput } from "@/components/inputs";
6+
import { MainLayout } from "@/components/MainLayout";
7+
import { FiltersModal } from "@/components/modals";
8+
import { CATEGORY_TYPE } from "@/types";
9+
import { useGetLabels } from "@/api";
10+
11+
const Categories = () => {
12+
const theme = useTheme();
13+
const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
14+
useGetLabels({ labelType: CATEGORY_TYPE });
15+
16+
return (
17+
<MainLayout title="Categories">
18+
<Grid2
19+
container
20+
justifyContent="space-between"
21+
direction={{ xs: "column-reverse", sm: "row" }}
22+
alignItems="center"
23+
gap={2}
24+
flexWrap="nowrap"
25+
>
26+
<CreateCategoryButton fullWidth={isMobile} />
27+
28+
<Grid2
29+
container
30+
alignItems="center"
31+
gap={2}
32+
ml={{ xs: 0, sm: "auto" }}
33+
flexWrap="nowrap"
34+
width={{ xs: "100%", sm: "auto" }}
35+
>
36+
<SearchInput />
37+
38+
<FiltersModal labelType={CATEGORY_TYPE} />
39+
</Grid2>
40+
</Grid2>
41+
42+
<CategoriesList />
43+
</MainLayout>
44+
);
45+
};
46+
47+
export default Categories;

app/login/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { useState } from "react";
88
import { Button, Form, TextInput, Link } from "@/components";
99
import { FieldValues } from "react-hook-form";
1010
import { useSnackbar } from "notistack";
11+
import { CATEGORIES_ROUTE } from "@/types";
1112

1213
const schema = z.object({
1314
email: z
@@ -21,7 +22,7 @@ const Login = () => {
2122
const [isLoading, setIsLoading] = useState(false);
2223
const { enqueueSnackbar } = useSnackbar();
2324
const searchParams = useSearchParams();
24-
const callbackUrl = searchParams.get("callbackUrl") || "/";
25+
const callbackUrl = searchParams.get("callbackUrl") || CATEGORIES_ROUTE;
2526

2627
const onSubmit = async (data: FieldValues) => {
2728
setIsLoading(true);
@@ -35,7 +36,7 @@ const Login = () => {
3536
if (res?.error) {
3637
enqueueSnackbar(`${res?.error}`, { variant: "error" });
3738
} else {
38-
window.location.assign("/");
39+
window.location.assign(CATEGORIES_ROUTE);
3940
}
4041
} catch (err) {
4142
enqueueSnackbar(`${err}`, { variant: "error" });

0 commit comments

Comments
 (0)