diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index dffe840..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["next"]
-}
diff --git a/.github/workflows/CI_CD_Master.yml b/.github/workflows/CI_CD_Master.yml
index 47a8ba2..0656817 100644
--- a/.github/workflows/CI_CD_Master.yml
+++ b/.github/workflows/CI_CD_Master.yml
@@ -21,14 +21,6 @@ jobs:
CI: 'true'
run: yarn install
- - name: yarn lint
- env:
- CI: 'true'
- NODE_ENV: 'production'
- NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL_STAGING }}
- NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY_STAGING }}
- run: yarn lint
-
- name: yarn test
env:
CI: 'true'
diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml
index a2e7566..766ec4f 100644
--- a/.github/workflows/PullRequest.yml
+++ b/.github/workflows/PullRequest.yml
@@ -18,14 +18,6 @@ jobs:
CI: 'true'
run: yarn install
- - name: yarn lint
- env:
- CI: 'true'
- NODE_ENV: 'production'
- NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL_STAGING }}
- NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY_STAGING }}
- run: yarn lint
-
- name: yarn test
env:
CI: 'true'
diff --git a/components/common/Spinner.tsx b/components/common/Spinner.tsx
deleted file mode 100644
index 74f8472..0000000
--- a/components/common/Spinner.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-interface ISpinnerProps {
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
- color?: 'teal' | 'gray';
-}
-
-const colorsBorder = {
- teal: 'border-teal-500',
- gray: 'border-gray-500',
-};
-
-const sizesH = {
- xs: 'h-2',
- sm: 'h-4',
- md: 'h-8',
- lg: 'h-16',
- xl: 'h-32',
-};
-
-const sizesW = {
- xs: 'w-2',
- sm: 'w-4',
- md: 'w-8',
- lg: 'w-16',
- xl: 'w-32',
-};
-
-const sizesBorder = {
- xs: 'border-2',
- sm: 'border-2',
- md: 'border-2',
- lg: 'border-4',
- xl: 'border-4',
-};
-
-export default function Spinner(props: ISpinnerProps) {
- const height = sizesH[props.size || 'md'];
- const width = sizesW[props.size || 'md'];
- const border = sizesBorder[props.size || 'md'];
- const borderColor = colorsBorder[props.color || 'teal'];
-
- return (
-
- );
-}
diff --git a/components/files/FileList.tsx b/components/files/FileList.tsx
index 437cd72..c20c31f 100644
--- a/components/files/FileList.tsx
+++ b/components/files/FileList.tsx
@@ -1,116 +1,116 @@
-import { List, Box, Spinner, Button, Flex } from '@chakra-ui/react';
-import React from 'react';
-import { useQuery } from 'react-query';
-import { FaSync, FaArrowUp } from 'react-icons/fa';
-import { useDropzone } from 'react-dropzone';
+// import { List, Box, Spinner, Button, Flex } from '@chakra-ui/react';
+// import React from 'react';
+// import { useQuery } from 'react-query';
+// import { FaSync, FaArrowUp } from 'react-icons/fa';
+// import { useDropzone } from 'react-dropzone';
-import FileListeItem from './FileListItem';
+// import FileListeItem from './FileListItem';
-function arrayBufferToBase64(buffer) {
- let binary = '';
- let bytes = new Uint8Array(buffer);
- let len = bytes.byteLength;
- for (let i = 0; i < len; i++) {
- binary += String.fromCharCode(bytes[i]);
- }
- return window.btoa(binary);
-}
+// function arrayBufferToBase64(buffer) {
+// let binary = '';
+// let bytes = new Uint8Array(buffer);
+// let len = bytes.byteLength;
+// for (let i = 0; i < len; i++) {
+// binary += String.fromCharCode(bytes[i]);
+// }
+// return window.btoa(binary);
+// }
-function uploadFiles(refetchMethod: (value: any) => any) {
- return function processFiles(acceptedFiles: File[]) {
- const processes = acceptedFiles.map((file) => {
- return new Promise((resolve, reject) => {
- const reader = new FileReader();
+// function uploadFiles(refetchMethod: (value: any) => any) {
+// return function processFiles(acceptedFiles: File[]) {
+// const processes = acceptedFiles.map((file) => {
+// return new Promise((resolve, reject) => {
+// const reader = new FileReader();
- reader.onabort = () => reject('file reading was aborted');
- reader.onerror = () => reject('file reading has failed');
- reader.onload = () => {
- const fileContent = reader.result;
- if (fileContent instanceof ArrayBuffer) {
- return resolve({});
- // return resolve(CreateFile(file.name, arrayBufferToBase64(fileContent)));
- }
- return reject('Wrong type recognized.');
- };
- reader.readAsArrayBuffer(file);
- });
- });
- Promise.all(processes).then(refetchMethod);
- };
-}
+// reader.onabort = () => reject('file reading was aborted');
+// reader.onerror = () => reject('file reading has failed');
+// reader.onload = () => {
+// const fileContent = reader.result;
+// if (fileContent instanceof ArrayBuffer) {
+// return resolve({});
+// // return resolve(CreateFile(file.name, arrayBufferToBase64(fileContent)));
+// }
+// return reject('Wrong type recognized.');
+// };
+// reader.readAsArrayBuffer(file);
+// });
+// });
+// Promise.all(processes).then(refetchMethod);
+// };
+// }
-function UploadFileButton(props) {
- const { getRootProps, getInputProps } = useDropzone({
- // onDrop: uploadFiles(props.refetch),
- noDrag: true,
- });
+// function UploadFileButton(props) {
+// const { getRootProps, getInputProps } = useDropzone({
+// // onDrop: uploadFiles(props.refetch),
+// noDrag: true,
+// });
- return (
- }
- width={{ base: 'auto', md: 150 }}
- mr={{ base: 0, md: 10 }}
- mb={{ base: 5, md: 10 }}
- >
-
- Upload file
-
- );
-}
+// return (
+// }
+// width={{ base: 'auto', md: 150 }}
+// mr={{ base: 0, md: 10 }}
+// mb={{ base: 5, md: 10 }}
+// >
+//
+// Upload file
+//
+// );
+// }
-export default function FileList() {
- const { isLoading, data, isFetching, refetch } = {
- isLoading: true,
- data: [],
- isFetching: true,
- refetch: (f) => f,
- };
- // const { isLoading, data, isFetching, refetch } = useQuery('files', () => ListFiles());
- const { getRootProps } = useDropzone({
- // onDrop: uploadFiles(refetch),
- noClick: true,
- });
+// export default function FileList() {
+// const { isLoading, data, isFetching, refetch } = {
+// isLoading: true,
+// data: [],
+// isFetching: true,
+// refetch: (f) => f,
+// };
+// // const { isLoading, data, isFetching, refetch } = useQuery('files', () => ListFiles());
+// const { getRootProps } = useDropzone({
+// // onDrop: uploadFiles(refetch),
+// noClick: true,
+// });
- return isLoading ? (
-
-
-
- ) : (
-
-
- : }
- // onClick={() => refetch()}
- width={{ base: 'auto', md: 150 }}
- mr={{ base: 0, md: 10 }}
- mb={{ base: 5, md: 10 }}
- isDisabled={isFetching}
- >
- Refresh
-
-
-
-
- {data &&
- data.map((f) => {
- return (
-
- );
- })}
-
-
- );
-}
+// return isLoading ? (
+//
+//
+//
+// ) : (
+//
+//
+// : }
+// // onClick={() => refetch()}
+// width={{ base: 'auto', md: 150 }}
+// mr={{ base: 0, md: 10 }}
+// mb={{ base: 5, md: 10 }}
+// isDisabled={isFetching}
+// >
+// Refresh
+//
+//
+//
+//
+// {data &&
+// data.map((f) => {
+// return (
+//
+// );
+// })}
+//
+//
+// );
+// }
diff --git a/components/files/FileListItem.tsx b/components/files/FileListItem.tsx
index e6be5a8..2e494fe 100644
--- a/components/files/FileListItem.tsx
+++ b/components/files/FileListItem.tsx
@@ -1,116 +1,116 @@
-import React from 'react';
-import {
- Box,
- Flex,
- Heading,
- IconButton,
- ListItem,
- Link,
- useColorMode,
- Button,
- Drawer,
- DrawerBody,
- DrawerCloseButton,
- DrawerContent,
- DrawerFooter,
- DrawerHeader,
- DrawerOverlay,
- Input,
- useDisclosure,
- FormLabel,
- Stack,
- Select,
-} from '@chakra-ui/react';
-import { FaEye, FaPen, FaTrash } from 'react-icons/fa';
-import mime from 'mime-types';
-import { formatDistanceToNow, parseJSON } from 'date-fns';
+// import React from 'react';
+// import {
+// Box,
+// Flex,
+// Heading,
+// IconButton,
+// ListItem,
+// Link,
+// useColorMode,
+// Button,
+// Drawer,
+// DrawerBody,
+// DrawerCloseButton,
+// DrawerContent,
+// DrawerFooter,
+// DrawerHeader,
+// DrawerOverlay,
+// Input,
+// useDisclosure,
+// FormLabel,
+// Stack,
+// Select,
+// } from '@chakra-ui/react';
+// import { FaEye, FaPen, FaTrash } from 'react-icons/fa';
+// import mime from 'mime-types';
+// import { formatDistanceToNow, parseJSON } from 'date-fns';
-export default function FileListItem(props) {
- const { colorMode } = useColorMode();
- const { isOpen, onOpen, onClose } = useDisclosure();
- const btnRef = React.useRef();
- const firstField = React.useRef();
+// export default function FileListItem(props) {
+// const { colorMode } = useColorMode();
+// const { isOpen, onOpen, onClose } = useDisclosure();
+// const btnRef = React.useRef();
+// const firstField = React.useRef();
- return (
-
-
-
- {props.name}
- {(props.properties.contentLength / 1024).toFixed(2)}kb |{' '}
- {formatDistanceToNow(parseJSON(props.properties.lastModified))}
-
+// return (
+//
+//
+//
+// {props.name}
+// {(props.properties.contentLength / 1024).toFixed(2)}kb |{' '}
+// {formatDistanceToNow(parseJSON(props.properties.lastModified))}
+//
-
-
- } />
-
- }
- ref={btnRef}
- onClick={onOpen}
- />
- }
- // onClick={() => RemoveFile(props.name).then(() => props.refetch())}
- />
-
-
-
-
-
-
- Modify {props.name}
+//
+//
+// } />
+//
+// }
+// ref={btnRef}
+// onClick={onOpen}
+// />
+// }
+// // onClick={() => RemoveFile(props.name).then(() => props.refetch())}
+// />
+//
+//
+//
+//
+//
+//
+// Modify {props.name}
-
-
-
- Content-Type
-
-
+//
+//
+//
+// Content-Type
+//
+//
-
- Cache-Control
-
-
-
-
+//
+// Cache-Control
+//
+//
+//
+//
-
-
-
-
-
-
-
-
- );
-}
+//
+//
+//
+//
+//
+//
+//
+//
+// );
+// }
diff --git a/components/github-actions/GitHubWorkflowCard.tsx b/components/github-actions/GitHubWorkflowCard.tsx
index 2d3ec71..cb74955 100644
--- a/components/github-actions/GitHubWorkflowCard.tsx
+++ b/components/github-actions/GitHubWorkflowCard.tsx
@@ -1,104 +1,104 @@
-import React from 'react';
-import { Box, Button, Heading, IconButton, Text } from '@chakra-ui/react';
-import Link from 'next/link';
-import { formatDistanceToNow, parseJSON } from 'date-fns';
-import { ImCross } from 'react-icons/im';
-import { FaSync, FaCheck, FaSlash, FaCog } from 'react-icons/fa';
-import { useQuery, UseQueryResult } from 'react-query';
-import { GetJobs } from '../../lib/github/Workflows';
-import Spinner from '../common/Spinner';
+// import React from 'react';
+// import { Box, Button, Heading, IconButton, Text } from '@chakra-ui/react';
+// import Link from 'next/link';
+// import { formatDistanceToNow, parseJSON } from 'date-fns';
+// import { ImCross } from 'react-icons/im';
+// import { FaSync, FaCheck, FaSlash, FaCog } from 'react-icons/fa';
+// import { useQuery, UseQueryResult } from 'react-query';
+// import { GetJobs } from '../../lib/github/Workflows';
+// import Spinner from '../common/Spinner';
-interface EnhancedWorkflowRun extends Types.External.WorkflowRun {
- parentReactQuery: UseQueryResult;
-}
+// interface EnhancedWorkflowRun extends Types.External.WorkflowRun {
+// parentReactQuery: UseQueryResult;
+// }
-interface IGitHubWorkflowCardProps extends EnhancedWorkflowRun {
- githubToken: string;
-}
+// interface IGitHubWorkflowCardProps extends EnhancedWorkflowRun {
+// githubToken: string;
+// }
-const statusToBg = {
- success: 'bg-teal-600',
- failure: 'bg-red-600',
- in_progress: '',
-};
+// const statusToBg = {
+// success: 'bg-teal-600',
+// failure: 'bg-red-600',
+// in_progress: '',
+// };
-const jobStatusToBg = {
- cancelled: 'bg-gray-500',
- success: 'bg-green-500',
- failure: 'bg-red-500',
- in_progress: 'bg-yellow-500',
- skipped: 'bg-gray-500',
-};
+// const jobStatusToBg = {
+// cancelled: 'bg-gray-500',
+// success: 'bg-green-500',
+// failure: 'bg-red-500',
+// in_progress: 'bg-yellow-500',
+// skipped: 'bg-gray-500',
+// };
-export default function GitHubWorkflowCard(props: IGitHubWorkflowCardProps) {
- const { data, isLoading } = useQuery(
- ['github-jobs', props.repository.name, props.id],
- () => GetJobs(props.githubToken, props.repository.name, props.id.toString()),
- {
- refetchInterval: (data) =>
- data ? (data.jobs.some((j) => j.status !== 'completed') ? 5000 : false) : false,
- refetchOnWindowFocus: (data) => data.state.data.jobs.some((j) => j.status !== 'completed'),
- refetchIntervalInBackground: false,
- },
- );
+// export default function GitHubWorkflowCard(props: IGitHubWorkflowCardProps) {
+// const { data, isLoading } = useQuery(
+// ['github-jobs', props.repository.name, props.id],
+// () => GetJobs(props.githubToken, props.repository.name, props.id.toString()),
+// {
+// refetchInterval: (data) =>
+// data ? (data.jobs.some((j) => j.status !== 'completed') ? 5000 : false) : false,
+// refetchOnWindowFocus: (data) => data.state.data.jobs.some((j) => j.status !== 'completed'),
+// refetchIntervalInBackground: false,
+// },
+// );
- return (
-
-
-
- {/*
:
}
- onClick={() => refetch()}
- isDisabled={isFetching}
- /> */}
-
+// return (
+//
+//
+//
+// {/*
:
}
+// onClick={() => refetch()}
+// isDisabled={isFetching}
+// /> */}
+//
-
{props.head_branch}
+//
{props.head_branch}
-
- {formatDistanceToNow(parseJSON(props.created_at))}
-
+//
+// {formatDistanceToNow(parseJSON(props.created_at))}
+//
- {isLoading ? (
-
-
-
- ) : (
-
- {data.jobs.map((j) => {
- const currentStatus = j.status === 'completed' ? j.conclusion : j.status;
- return (
-
- {currentStatus === 'cancelled' && }
- {currentStatus === 'in_progress' && }
- {currentStatus === 'failure' && }
- {currentStatus === 'success' && }
- {currentStatus === 'skipped' && }
-
- {j.name}
-
-
- );
- })}
-
- )}
-
- );
-}
+// {isLoading ? (
+//
+//
+//
+// ) : (
+//
+// {data.jobs.map((j) => {
+// const currentStatus = j.status === 'completed' ? j.conclusion : j.status;
+// return (
+//
+// {currentStatus === 'cancelled' && }
+// {currentStatus === 'in_progress' && }
+// {currentStatus === 'failure' && }
+// {currentStatus === 'success' && }
+// {currentStatus === 'skipped' && }
+//
+// {j.name}
+//
+//
+// );
+// })}
+//
+// )}
+//
+// );
+// }
diff --git a/components/github-actions/GitHubWorkflowGrid.tsx b/components/github-actions/GitHubWorkflowGrid.tsx
index 221fc71..0d76f53 100644
--- a/components/github-actions/GitHubWorkflowGrid.tsx
+++ b/components/github-actions/GitHubWorkflowGrid.tsx
@@ -1,16 +1,16 @@
-import { SimpleGrid } from '@chakra-ui/react';
-import React from 'react';
-import GitHubWorkflowHandler from './GitHubWorkflowHandler';
+// import { SimpleGrid } from '@chakra-ui/react';
+// import React from 'react';
+// import GitHubWorkflowHandler from './GitHubWorkflowHandler';
-interface IGitHubWorkflowGridProps {
- githubToken: string;
-}
+// interface IGitHubWorkflowGridProps {
+// githubToken: string;
+// }
-export default function GitHubWorkflowGrid(props: IGitHubWorkflowGridProps) {
- return (
-
- );
-}
+// export default function GitHubWorkflowGrid(props: IGitHubWorkflowGridProps) {
+// return (
+//
+// );
+// }
diff --git a/components/github-actions/GitHubWorkflowHandler.tsx b/components/github-actions/GitHubWorkflowHandler.tsx
index a726cf2..1f4fa2c 100644
--- a/components/github-actions/GitHubWorkflowHandler.tsx
+++ b/components/github-actions/GitHubWorkflowHandler.tsx
@@ -1,58 +1,58 @@
-import React, { useEffect, useState } from 'react';
-import { useQueries, UseQueryResult } from 'react-query';
-import { GetWorkflows } from '../../lib/github/Workflows';
-import Spinner from '../common/Spinner';
-import GitHubWorkflowCard from './GitHubWorkflowCard';
-import orderBy from 'lodash/orderBy';
+// import React, { useEffect, useState } from 'react';
+// import { useQueries, UseQueryResult } from 'react-query';
+// import { GetWorkflows } from '../../lib/github/Workflows';
+// import Spinner from '../common/Spinner';
+// import GitHubWorkflowCard from './GitHubWorkflowCard';
+// import orderBy from 'lodash/orderBy';
-interface IGitHubWorkflowHandlerProps {
- githubToken: string;
- repositoriesName: string[];
-}
+// interface IGitHubWorkflowHandlerProps {
+// githubToken: string;
+// repositoriesName: string[];
+// }
-interface EnhancedWorkflowRun extends Types.External.WorkflowRun {
- parentReactQuery: UseQueryResult;
-}
+// interface EnhancedWorkflowRun extends Types.External.WorkflowRun {
+// parentReactQuery: UseQueryResult;
+// }
-function orderWorkflows(
- queries: UseQueryResult[],
-): EnhancedWorkflowRun[] {
- return orderBy(
- queries.flatMap((q) =>
- q.data.workflow_runs.map((run) => Object.assign({}, run, { parentReactQuery: q })),
- ),
- 'created_at',
- 'desc',
- );
-}
+// function orderWorkflows(
+// queries: UseQueryResult[],
+// ): EnhancedWorkflowRun[] {
+// return orderBy(
+// queries.flatMap((q) =>
+// q.data.workflow_runs.map((run) => Object.assign({}, run, { parentReactQuery: q })),
+// ),
+// 'created_at',
+// 'desc',
+// );
+// }
-export default function GitHubWorkflowHandler(props: IGitHubWorkflowHandlerProps) {
- const [workflows, setWorkflows] = useState([]);
- const queries = useQueries(
- props.repositoriesName.map((repositoryName) => ({
- queryKey: ['github-repos', repositoryName],
- queryFn: () => GetWorkflows(props.githubToken, repositoryName),
- refetchInterval: 30000,
- refetchOnWindowFocus: true,
- refetchIntervalInBackground: false,
- })),
- );
+// export default function GitHubWorkflowHandler(props: IGitHubWorkflowHandlerProps) {
+// const [workflows, setWorkflows] = useState([]);
+// const queries = useQueries(
+// props.repositoriesName.map((repositoryName) => ({
+// queryKey: ['github-repos', repositoryName],
+// queryFn: () => GetWorkflows(props.githubToken, repositoryName),
+// refetchInterval: 30000,
+// refetchOnWindowFocus: true,
+// refetchIntervalInBackground: false,
+// })),
+// );
- useEffect(() => {
- if (!queries.some((q) => q.isLoading)) {
- setWorkflows(orderWorkflows(queries));
- }
- }, [queries.some((q) => q.isLoading)]);
+// useEffect(() => {
+// if (!queries.some((q) => q.isLoading)) {
+// setWorkflows(orderWorkflows(queries));
+// }
+// }, [queries.some((q) => q.isLoading)]);
- return queries.some((q) => q.isLoading) ? (
-
-
-
- ) : (
-
- {workflows.map((run) => {
- return ;
- })}
-
- );
-}
+// return queries.some((q) => q.isLoading) ? (
+//
+//
+//
+// ) : (
+//
+// {workflows.map((run) => {
+// return ;
+// })}
+//
+// );
+// }
diff --git a/components/users/UserBox.tsx b/components/users/UserBox.tsx
index 062a6ba..2dd1e26 100644
--- a/components/users/UserBox.tsx
+++ b/components/users/UserBox.tsx
@@ -1,61 +1,61 @@
-import React, { useState } from 'react';
-import Image from 'next/image';
-import Link from 'next/link';
-import { User } from '@supabase/supabase-js';
+// import React, { useState } from 'react';
+// import Image from 'next/image';
+// import Link from 'next/link';
+// import { User } from '@supabase/supabase-js';
-import { UpsertUserRoleToSupabase } from '../../lib/supabase/users/DataResolver';
+// import { UpsertUserRoleToSupabase } from '../../lib/supabase/users/DataResolver';
-interface IUserBoxProps {
- user: User;
- userRole: Types.Canonical.UserRole;
- isFetching: boolean;
-}
+// interface IUserBoxProps {
+// user: User;
+// userRole: Types.Canonical.UserRole;
+// isFetching: boolean;
+// }
-export default function UserBox(props: IUserBoxProps) {
- const [isAdmin, setIsAdmin] = useState(props.userRole?.Role === 'Admin');
- const [canModify, setCanModify] = useState(true);
+// export default function UserBox(props: IUserBoxProps) {
+// const [isAdmin, setIsAdmin] = useState(props.userRole?.Role === 'Admin');
+// const [canModify, setCanModify] = useState(true);
- return (
-
-
-
-
-
-
-
-
- );
-}
+// return (
+//
+//
+//
+//
+//
+//
+//
+//
+// );
+// }
diff --git a/components/users/UsersGrid.tsx b/components/users/UsersGrid.tsx
index 39d9351..31e7bac 100644
--- a/components/users/UsersGrid.tsx
+++ b/components/users/UsersGrid.tsx
@@ -1,42 +1,42 @@
-import { Button } from '@chakra-ui/react';
-import React from 'react';
-import { FaSync } from 'react-icons/fa';
-import { User } from '@supabase/supabase-js';
+// import { Button } from '@chakra-ui/react';
+// import React from 'react';
+// import { FaSync } from 'react-icons/fa';
+// import { User } from '@supabase/supabase-js';
-import UserBox from './UserBox';
-import Spinner from '../common/Spinner';
+// import UserBox from './UserBox';
+// import Spinner from '../common/Spinner';
-interface IUsersGridProps {
- data: (User & { userRole: Types.Canonical.UserRole })[];
- refetch: Function;
- isFetching: boolean;
-}
+// interface IUsersGridProps {
+// data: (User & { userRole: Types.Canonical.UserRole })[];
+// refetch: Function;
+// isFetching: boolean;
+// }
-export default function UsersGrid(props: IUsersGridProps) {
- return (
- <>
-
- : }
- onClick={() => props.refetch()}
- mr={{ base: 0, md: 10 }}
- mb={{ base: 5, md: 10 }}
- disabled={props.isFetching}
- >
- Refresh
-
-
-
- {props.data.map((user) => (
-
- ))}
-
- >
- );
-}
+// export default function UsersGrid(props: IUsersGridProps) {
+// return (
+// <>
+//
+// : }
+// onClick={() => props.refetch()}
+// mr={{ base: 0, md: 10 }}
+// mb={{ base: 5, md: 10 }}
+// disabled={props.isFetching}
+// >
+// Refresh
+//
+//
+//
+// {props.data.map((user) => (
+//
+// ))}
+//
+// >
+// );
+// }
diff --git a/components/users/UsersHandler.tsx b/components/users/UsersHandler.tsx
index 7848304..631b83e 100644
--- a/components/users/UsersHandler.tsx
+++ b/components/users/UsersHandler.tsx
@@ -1,28 +1,28 @@
-import React from 'react';
-import { useQuery } from 'react-query';
-import { Auth } from '@supabase/ui';
+// import React from 'react';
+// import { useQuery } from 'react-query';
+// import { Auth } from '@supabase/ui';
-import { GetUsersFromSupabase } from '../../lib/supabase/users/DataResolver';
-import UsersGrid from './UsersGrid';
-import Spinner from '../common/Spinner';
+// import { GetUsersFromSupabase } from '../../lib/supabase/users/DataResolver';
+// import UsersGrid from './UsersGrid';
+// import Spinner from '../common/Spinner';
-export default function UsersHandler() {
- const { session } = Auth.useUser();
- const { data, isLoading, refetch, error, isFetching } = useQuery(
- 'users',
- () => GetUsersFromSupabase(session.access_token),
- {
- retry: false,
- },
- );
+// export default function UsersHandler() {
+// const { session } = Auth.useUser();
+// const { data, isLoading, refetch, error, isFetching } = useQuery(
+// 'users',
+// () => GetUsersFromSupabase(session.access_token),
+// {
+// retry: false,
+// },
+// );
- return isLoading ? (
-
-
-
- ) : error ? (
- {error.toString()}
- ) : (
-
- );
-}
+// return isLoading ? (
+//
+//
+//
+// ) : error ? (
+// {error.toString()}
+// ) : (
+//
+// );
+// }
diff --git a/lib/supabase/Client.ts b/lib/supabase/Client.ts
index 9eabf6e..9fe4230 100644
--- a/lib/supabase/Client.ts
+++ b/lib/supabase/Client.ts
@@ -1,5 +1,9 @@
import { createClient } from '@supabase/supabase-js';
+if(!process.env.NEXT_PUBLIC_SUPABASE_URL || !process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY) {
+ throw new Error("Missing environment variables for Supabase.");
+}
+
export default createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
diff --git a/lib/supabase/users/DataResolver.ts b/lib/supabase/users/DataResolver.ts
index ebef33d..8e1fc22 100644
--- a/lib/supabase/users/DataResolver.ts
+++ b/lib/supabase/users/DataResolver.ts
@@ -1,39 +1,39 @@
-import axios from 'axios';
+// import axios from 'axios';
-import supabase from '../Client';
+// import supabase from '../Client';
-function handleSupabaseError({ error, ...rest }) {
- if (error) {
- throw error;
- }
- return rest;
-}
+// function handleSupabaseError({ error, ...rest }) {
+// if (error) {
+// throw error;
+// }
+// return rest;
+// }
-export function GetUsersFromSupabase(access_token) {
- return axios
- .get('/api/users', {
- headers: {
- 'X-Supabase-Token': access_token,
- },
- })
- .then((d) => d.data)
- .catch((error) => {
- throw error.response.data.message;
- });
-}
+// export function GetUsersFromSupabase(access_token) {
+// return axios
+// .get('/api/users', {
+// headers: {
+// 'X-Supabase-Token': access_token,
+// },
+// })
+// .then((d) => d.data)
+// .catch((error) => {
+// throw error.response.data.message;
+// });
+// }
-export function GetUserRoleFromSupabase() {
- return supabase
- .from('UserRole')
- .select('*')
- .then(handleSupabaseError)
- .then((d) => d.body);
-}
+// export function GetUserRoleFromSupabase() {
+// return supabase
+// .from('UserRole')
+// .select('*')
+// .then(handleSupabaseError)
+// .then((d) => d.body);
+// }
-export function UpsertUserRoleToSupabase(data: Types.Canonical.UserRole) {
- return supabase
- .from('UserRole')
- .upsert([data])
- .then(handleSupabaseError)
- .then((d) => d.body);
-}
+// export function UpsertUserRoleToSupabase(data: Types.Canonical.UserRole) {
+// return supabase
+// .from('UserRole')
+// .upsert([data])
+// .then(handleSupabaseError)
+// .then((d) => d.body);
+// }
diff --git a/package.json b/package.json
index ee72c53..85c1a2c 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,6 @@
"build": "next build",
"start": "next start",
"test": "next build",
- "lint": "next lint",
"prettier": "prettier --write {components,config,lib,pages,app}/**/*.{js,ts,jsx,tsx}"
},
"dependencies": {
@@ -35,10 +34,6 @@
"@types/react-dropzone": "^5.1.0",
"@vercel/node": "^3.2.7",
"autoprefixer": "^10.4.19",
- "eslint": "^9.7.0",
- "eslint-config-next": "14.2.5",
- "eslint-config-prettier": "^9.1.0",
- "eslint-plugin-prettier": "^5.2.1",
"postcss": "^8.4.39",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.6",