mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 06:34:57 +00:00
chore(frontend): fixed all eslint errors
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { useEffect } from 'react';
|
||||
import Image from 'next/image';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
import Button from '~/components/basic/buttons/Button';
|
||||
import { getTranslatedServerSideProps } from '~/utilities/withTranslateProps';
|
||||
import Button from '@app/components/basic/buttons/Button';
|
||||
import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
|
||||
|
||||
import getWorkspaces from './api/workspace/getWorkspaces';
|
||||
|
||||
@@ -13,38 +12,33 @@ export default function NoProjects() {
|
||||
const redirectUser = async () => {
|
||||
const workspaces = await getWorkspaces();
|
||||
if (workspaces.length > 0) {
|
||||
router.push('/dashboard/' + workspaces[0]._id);
|
||||
router.push(`/dashboard/${workspaces[0]._id}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
// on initial load - run auth check
|
||||
(async () => {
|
||||
await redirectUser()
|
||||
await redirectUser();
|
||||
})();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className='h-full flex flex-col items-center justify-center text-gray-300 text-lg text-center w-11/12 mr-auto'>
|
||||
<div className='mb-6 mt-16 mr-16'>
|
||||
<Image
|
||||
src='/images/dragon-cant-find.svg'
|
||||
height={270}
|
||||
width={436}
|
||||
alt='google logo'
|
||||
></Image>
|
||||
<div className="h-full flex flex-col items-center justify-center text-gray-300 text-lg text-center w-11/12 mr-auto">
|
||||
<div className="mb-6 mt-16 mr-16">
|
||||
<Image src="/images/dragon-cant-find.svg" height={270} width={436} alt="google logo" />
|
||||
</div>
|
||||
<div className='px-4 rounded-md bg-bunker-500 mb-8 text-bunker-300 shadow-xl py-6'>
|
||||
<div className='max-w-md'>
|
||||
You are not part of any projects in this organization yet. When you
|
||||
do, they will appear here.
|
||||
<div className="px-4 rounded-md bg-bunker-500 mb-8 text-bunker-300 shadow-xl py-6">
|
||||
<div className="max-w-md">
|
||||
You are not part of any projects in this organization yet. When you do, they will appear
|
||||
here.
|
||||
</div>
|
||||
<div className='max-w-md mt-4'>
|
||||
Create a new project, or ask other organization members to give you
|
||||
neccessary permissions.
|
||||
<div className="max-w-md mt-4">
|
||||
Create a new project, or ask other organization members to give you neccessary
|
||||
permissions.
|
||||
</div>
|
||||
<div className='mt-6 mx-2'>
|
||||
<Button text="Check again" onButtonPressed={redirectUser} size="md" color="mineshaft"/>
|
||||
<div className="mt-6 mx-2">
|
||||
<Button text="Check again" onButtonPressed={redirectUser} size="md" color="mineshaft" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user