+
-
-
-
-
{' '}
+ {data?.checkAuth.__typename === 'CheckAuthResponse' &&
+ data.checkAuth.isAuth && (
+
+
+
+
+ )}
))}
-
+ {/*
{ProjectYears.map(year => (
))}
-
+
*/}
);
}
diff --git a/src/components/pages/ProjectsPage/ProjectsSection.tsx b/src/components/pages/ProjectsPage/ProjectsSection.tsx
index 8115642a..0a65cad5 100644
--- a/src/components/pages/ProjectsPage/ProjectsSection.tsx
+++ b/src/components/pages/ProjectsPage/ProjectsSection.tsx
@@ -22,15 +22,16 @@ export function ProjectsSection({
const [filteredProjects, setFilteredProjects] = useState(projects);
useEffect(() => {
+ console.log(projects);
setFilteredProjects(
projects.filter(
project =>
- (!params.has('tags') ||
- (params.getAll('tags') as Device[]).every(tag =>
- project.devices.includes(tag),
- )) &&
- (!params.has('year') ||
- params.get('year') === project.releaseDate.split('-')[0]),
+ !params.has('tags') ||
+ (params.getAll('tags') as Device[]).every(tag =>
+ project.devices.includes(tag),
+ ),
+ // &&(!params.has('year') ||
+ // params.get('year') === project.releaseDate.split('-')[0]),
),
);
}, [projects, params]);
diff --git a/src/consts/ProjectTags.ts b/src/consts/ProjectTags.ts
index 8e5827f0..5281677f 100644
--- a/src/consts/ProjectTags.ts
+++ b/src/consts/ProjectTags.ts
@@ -1,3 +1,3 @@
import { Device } from '@/types/IProject';
-export const ProjectTags: Device[] = ['mobile', 'stream', 'touch', 'vr'];
+export const ProjectTags: Device[] = ['Mobile', 'Stream', 'Touch', 'VR'];
diff --git a/src/consts/products.json b/src/consts/products.json
index afb1c3ea..86336811 100644
--- a/src/consts/products.json
+++ b/src/consts/products.json
@@ -13,24 +13,18 @@
},
{
"id": 2,
- "title": "View",
- "text": "Интерактивное окно",
- "image": "/img/components/products/view.png"
- },
- {
- "id": 3,
"title": "Web",
"text": "Создание сайтов",
"image": "/img/components/products/web.png"
},
{
- "id": 4,
+ "id": 3,
"title": "360",
"text": "Сферы для сайта",
"image": "/img/components/products/360.png"
},
{
- "id": 5,
+ "id": 4,
"title": "Picture",
"text": "Архитектурная визуализация",
"image": "/img/components/products/picture.png"
diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts
index b7a36c13..10582f76 100644
--- a/src/generated/graphql.ts
+++ b/src/generated/graphql.ts
@@ -186,6 +186,7 @@ export type Query = {
logout: LogoutResult;
project: ProjectResult;
projects: ProjectsResult;
+ regionName: RegionResult;
};
@@ -219,6 +220,13 @@ export type Quote = {
type: Scalars['String']['output'];
};
+export type Region = {
+ __typename?: 'Region';
+ regionName: Scalars['String']['output'];
+};
+
+export type RegionResult = Error | Region;
+
export type Slider = {
__typename?: 'Slider';
images: Array
;
diff --git a/src/queries/region/getRegionName.generated.ts b/src/queries/region/getRegionName.generated.ts
new file mode 100644
index 00000000..dd8c2f13
--- /dev/null
+++ b/src/queries/region/getRegionName.generated.ts
@@ -0,0 +1,55 @@
+import * as Types from '../../generated/graphql';
+
+import { gql } from '@apollo/client';
+import * as Apollo from '@apollo/client';
+const defaultOptions = {} as const;
+export type GetRegionNameQueryVariables = Types.Exact<{ [key: string]: never; }>;
+
+
+export type GetRegionNameQuery = { __typename?: 'Query', regionName: { __typename?: 'Error', message: string } | { __typename?: 'Region', regionName: string } };
+
+
+export const GetRegionNameDocument = gql`
+ query GetRegionName {
+ regionName {
+ ... on Region {
+ regionName
+ }
+ ... on Error {
+ message
+ }
+ }
+}
+ `;
+
+/**
+ * __useGetRegionNameQuery__
+ *
+ * To run a query within a React component, call `useGetRegionNameQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetRegionNameQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * you can use to render your UI.
+ *
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
+ *
+ * @example
+ * const { data, loading, error } = useGetRegionNameQuery({
+ * variables: {
+ * },
+ * });
+ */
+export function useGetRegionNameQuery(baseOptions?: Apollo.QueryHookOptions) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useQuery(GetRegionNameDocument, options);
+ }
+export function useGetRegionNameLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) {
+ const options = {...defaultOptions, ...baseOptions}
+ return Apollo.useLazyQuery(GetRegionNameDocument, options);
+ }
+export function useGetRegionNameSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) {
+ const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
+ return Apollo.useSuspenseQuery(GetRegionNameDocument, options);
+ }
+export type GetRegionNameQueryHookResult = ReturnType;
+export type GetRegionNameLazyQueryHookResult = ReturnType;
+export type GetRegionNameSuspenseQueryHookResult = ReturnType;
+export type GetRegionNameQueryResult = Apollo.QueryResult;
\ No newline at end of file
diff --git a/src/queries/region/getRegionName.gql b/src/queries/region/getRegionName.gql
new file mode 100644
index 00000000..1a817263
--- /dev/null
+++ b/src/queries/region/getRegionName.gql
@@ -0,0 +1,10 @@
+query GetRegionName {
+ regionName {
+ ... on Region {
+ regionName
+ }
+ ... on Error {
+ message
+ }
+ }
+}
diff --git a/src/queries/region/index.ts b/src/queries/region/index.ts
new file mode 100644
index 00000000..559835ac
--- /dev/null
+++ b/src/queries/region/index.ts
@@ -0,0 +1 @@
+export * from './getRegionName.generated';
diff --git a/src/types/IProject.ts b/src/types/IProject.ts
index 8250453b..fbd65cf5 100644
--- a/src/types/IProject.ts
+++ b/src/types/IProject.ts
@@ -1,4 +1,4 @@
-export type Device = 'stream' | 'touch' | 'mobile' | 'vr';
+export type Device = 'Stream' | 'Touch' | 'Mobile' | 'VR';
export interface IProject {
id: number;