mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 13:28:34 +00:00
ref(frontend): fix file or disable eslint rules
This commit is contained in:
@@ -10,11 +10,14 @@ export default function DashboardRedirect() {
|
||||
/**
|
||||
* Here we forward to the default workspace if a user opens this url
|
||||
*/
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
useEffect(async () => {
|
||||
let userWorkspace;
|
||||
try {
|
||||
if (localStorage.getItem("projectData.id")) {
|
||||
router.push("/dashboard/" + localStorage.getItem("projectData.id"));
|
||||
router.push(
|
||||
"/dashboard/" + localStorage.getItem("projectData.id")
|
||||
);
|
||||
} else {
|
||||
const userWorkspaces = await getWorkspaces();
|
||||
userWorkspace = userWorkspaces[0]._id;
|
||||
@@ -23,9 +26,10 @@ export default function DashboardRedirect() {
|
||||
} catch (error) {
|
||||
console.log("Error - Not logged in yet");
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return <div></div>
|
||||
return <div></div>;
|
||||
}
|
||||
|
||||
DashboardRedirect.requireAuth = true;
|
||||
|
||||
@@ -201,50 +201,54 @@ export default function Dashboard() {
|
||||
);
|
||||
};
|
||||
|
||||
useEffect(async () => {
|
||||
try {
|
||||
let userWorkspaces = await getWorkspaces();
|
||||
const listWorkspaces = userWorkspaces.map(
|
||||
(workspace) => workspace._id
|
||||
);
|
||||
if (
|
||||
!listWorkspaces.includes(
|
||||
router.asPath.split("/")[2].split("?")[0]
|
||||
)
|
||||
) {
|
||||
router.push("/dashboard/" + listWorkspaces[0]);
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
try {
|
||||
let userWorkspaces = await getWorkspaces();
|
||||
const listWorkspaces = userWorkspaces.map(
|
||||
(workspace) => workspace._id
|
||||
);
|
||||
if (
|
||||
!listWorkspaces.includes(
|
||||
router.asPath.split("/")[2].split("?")[0]
|
||||
)
|
||||
) {
|
||||
router.push("/dashboard/" + listWorkspaces[0]);
|
||||
}
|
||||
|
||||
if (env != router.asPath.split("?")[1]) {
|
||||
router.push(router.asPath.split("?")[0] + "?" + env);
|
||||
}
|
||||
setBlurred(true);
|
||||
setWorkspaceId(router.query.id);
|
||||
|
||||
await getSecretsForProject({
|
||||
env,
|
||||
setFileState,
|
||||
setIsKeyAvailable,
|
||||
setData,
|
||||
workspaceId: router.query.id,
|
||||
});
|
||||
|
||||
const user = await getUser();
|
||||
setIsNew(
|
||||
(Date.parse(new Date()) - Date.parse(user.createdAt)) /
|
||||
60000 <
|
||||
3
|
||||
? true
|
||||
: false
|
||||
);
|
||||
|
||||
let userAction = await checkUserAction({
|
||||
action: "first_time_secrets_pushed",
|
||||
});
|
||||
setHasUserEverPushed(userAction ? true : false);
|
||||
} catch (error) {
|
||||
console.log("Error", error);
|
||||
setData([]);
|
||||
}
|
||||
|
||||
if (env != router.asPath.split("?")[1]) {
|
||||
router.push(router.asPath.split("?")[0] + "?" + env);
|
||||
}
|
||||
setBlurred(true);
|
||||
setWorkspaceId(router.query.id);
|
||||
|
||||
await getSecretsForProject({
|
||||
env,
|
||||
setFileState,
|
||||
setIsKeyAvailable,
|
||||
setData,
|
||||
workspaceId: router.query.id,
|
||||
});
|
||||
|
||||
const user = await getUser();
|
||||
setIsNew(
|
||||
(Date.parse(new Date()) - Date.parse(user.createdAt)) / 60000 <
|
||||
3
|
||||
? true
|
||||
: false
|
||||
);
|
||||
|
||||
let userAction = await checkUserAction({
|
||||
action: "first_time_secrets_pushed",
|
||||
});
|
||||
setHasUserEverPushed(userAction ? true : false);
|
||||
} catch (error) {
|
||||
console.log("Error", error);
|
||||
setData([]);
|
||||
}
|
||||
})();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [env]);
|
||||
|
||||
const addRow = () => {
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useRouter } from "next/router";
|
||||
const queryString = require("query-string");
|
||||
import AuthorizeIntegration from "./api/integrations/authorizeIntegration";
|
||||
|
||||
|
||||
export default function Heroku() {
|
||||
const router = useRouter();
|
||||
const parsedUrl = queryString.parse(router.asPath.split("?")[1]);
|
||||
@@ -14,22 +13,26 @@ export default function Heroku() {
|
||||
/**
|
||||
* Here we forward to the default workspace if a user opens this url
|
||||
*/
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
useEffect(async () => {
|
||||
try {
|
||||
if (state == localStorage.getItem("latestCSRFToken")) {
|
||||
await AuthorizeIntegration({
|
||||
workspaceId: localStorage.getItem("projectData.id"),
|
||||
code,
|
||||
integration: "heroku"
|
||||
})
|
||||
router.push("/integrations/" + localStorage.getItem("projectData.id"));
|
||||
workspaceId: localStorage.getItem("projectData.id"),
|
||||
code,
|
||||
integration: "heroku",
|
||||
});
|
||||
router.push(
|
||||
"/integrations/" + localStorage.getItem("projectData.id")
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("Error - Not logged in yet");
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return <div></div>
|
||||
return <div></div>;
|
||||
}
|
||||
|
||||
Heroku.requireAuth = true;
|
||||
|
||||
@@ -4,12 +4,10 @@ import { useRouter } from "next/router";
|
||||
export default function Home() {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(async () => {
|
||||
useEffect(() => {
|
||||
router.push("/login");
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="bg-bunker-800 w-screen">
|
||||
</div>
|
||||
);
|
||||
return <div className="bg-bunker-800 w-screen"></div>;
|
||||
}
|
||||
|
||||
@@ -251,8 +251,8 @@ export default function Integrations() {
|
||||
<div className="flex flex-col max-w-5xl justify-center bg-white/5 p-6 rounded-md mx-6 mt-8">
|
||||
<div className="relative px-4 flex flex-col text-gray-400 items-center justify-center">
|
||||
<div className="mb-1">
|
||||
You don't have any integrations set up yet.
|
||||
When you do, they will appear here.
|
||||
You {"don't"} have any integrations set up
|
||||
yet. When you do, they will appear here.
|
||||
</div>
|
||||
<div className="">
|
||||
To start, click on any of the options below.
|
||||
|
||||
@@ -13,8 +13,8 @@ export default function Activity() {
|
||||
<p className="mt-2 mb-1 text-xl">Your invite has expired. </p>
|
||||
<p className="text-xl">Ask the administrator for a new one.</p>
|
||||
<p className="text-md mt-8 text-gray-600 max-w-sm text-center">
|
||||
Note: If it still doesn't work, please reach out to us at
|
||||
support@infisical.com
|
||||
Note: If it still {"doesn't work"}, please reach out to us
|
||||
at support@infisical.com
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -70,8 +70,8 @@ export default function SettingsBilling() {
|
||||
Usage & Billing
|
||||
</p>
|
||||
<p className="font-normal mr-4 text-gray-400 text-base">
|
||||
View and manage your organization's subscription
|
||||
here.
|
||||
View and manage your {"organization's"}{" "}
|
||||
subscription here.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -165,6 +165,7 @@ export default function SettingsBasic() {
|
||||
For more guidance, including code
|
||||
snipets for various languages and
|
||||
frameworks, see{" "}
|
||||
{/* eslint-disable-next-line react/jsx-no-target-blank */}
|
||||
<a
|
||||
href="https://infisical.com/docs/getting-started/introduction"
|
||||
target="_blank"
|
||||
|
||||
@@ -253,7 +253,7 @@ export default function SignUp() {
|
||||
const step1 = (
|
||||
<div className="bg-bunker w-full max-w-md mx-auto h-7/12 py-8 md:px-6 mx-1 mb-48 md:mb-16 rounded-xl drop-shadow-xl">
|
||||
<p className="text-4xl font-semibold flex justify-center text-transparent bg-clip-text bg-gradient-to-br from-sky-400 to-primary">
|
||||
Let's get started
|
||||
{"Let'"}s get started
|
||||
</p>
|
||||
<div className="flex flex-col items-center justify-center w-full md:pb-2 max-h-24 max-w-md mx-auto pt-2">
|
||||
<Link href="/login">
|
||||
@@ -300,7 +300,7 @@ export default function SignUp() {
|
||||
const step2 = (
|
||||
<div className="bg-bunker w-max mx-auto h-7/12 pt-10 pb-4 px-8 rounded-xl drop-shadow-xl mb-64 md:mb-16">
|
||||
<p className="text-l flex justify-center text-gray-400">
|
||||
We've sent a verification email to{" "}
|
||||
{"We've"} sent a verification email to{" "}
|
||||
</p>
|
||||
<p className="text-l flex justify-center font-semibold my-2 text-gray-400">
|
||||
{email}{" "}
|
||||
@@ -326,7 +326,7 @@ export default function SignUp() {
|
||||
{codeError && (
|
||||
<Error text="Oops. Your code is wrong. Please try again." />
|
||||
)}
|
||||
<div className="flex max-w-min flex-col items-center justify-center md:p-2 max-h-24 max-w-md mx-auto text-lg px-4 mt-4 mb-2">
|
||||
<div className="flex flex-col items-center justify-center md:p-2 max-h-24 max-w-md mx-auto text-lg px-4 mt-4 mb-2">
|
||||
<Button
|
||||
text="Verify"
|
||||
onButtonPressed={incrementStep}
|
||||
|
||||
@@ -85,6 +85,7 @@ export default function Users() {
|
||||
|
||||
const [userList, setUserList] = useState();
|
||||
const [orgUserList, setOrgUserList] = useState([]);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
useEffect(async () => {
|
||||
const user = await getUser();
|
||||
setPersonalEmail(user.email);
|
||||
|
||||
Reference in New Issue
Block a user