Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80bcca71ff | ||
|
|
3db0ec819a | ||
|
|
414ea7371d | ||
|
|
2b84b7c18d | ||
|
|
674347c99e | ||
|
|
c1102180e6 | ||
|
|
650c0c3b78 | ||
|
|
6f397710ce | ||
|
|
e6bd6b6a8c | ||
|
|
9d3952006b | ||
|
|
b75473a684 | ||
|
|
2f5bd58c61 | ||
|
|
e833fccf61 | ||
|
|
62ba9abdb4 | ||
|
|
46b138eb0b | ||
|
|
59bdf222f5 | ||
|
|
eb50ade5e3 | ||
|
|
85a08e4abd | ||
|
|
aa2e1697b0 | ||
|
|
3beab9de6f | ||
|
|
13d21e752d | ||
|
|
9ff8994c0e | ||
|
|
3488001197 | ||
|
|
2ced7e4911 | ||
|
|
e5a3bec28c | ||
|
|
e930f8cc7b |
@@ -41,9 +41,9 @@ class GPTIntegrationEndpoint(BaseAPIView):
|
||||
final_text = task + "\n" + prompt
|
||||
|
||||
openai.api_key = settings.OPENAI_API_KEY
|
||||
response = openai.ChatCompletion.create(
|
||||
response = openai.Completion.create(
|
||||
model=settings.GPT_ENGINE,
|
||||
messages=[{"role": "user", "content": final_text}],
|
||||
prompt=final_text,
|
||||
temperature=0.7,
|
||||
max_tokens=1024,
|
||||
)
|
||||
@@ -51,7 +51,7 @@ class GPTIntegrationEndpoint(BaseAPIView):
|
||||
workspace = Workspace.objects.get(slug=slug)
|
||||
project = Project.objects.get(pk=project_id)
|
||||
|
||||
text = response.choices[0].message.content.strip()
|
||||
text = response.choices[0].text.strip()
|
||||
text_html = text.replace("\n", "<br/>")
|
||||
return Response(
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"prepare": "husky install",
|
||||
"build": "turbo run build",
|
||||
"dev": "turbo run dev",
|
||||
"start": "turbo run start",
|
||||
|
||||
@@ -4,8 +4,6 @@ import { useRouter } from "next/router";
|
||||
|
||||
import useSWRInfinite from "swr/infinite";
|
||||
|
||||
import getConfig from "next/config";
|
||||
|
||||
// services
|
||||
import projectService from "services/project.service";
|
||||
// ui
|
||||
@@ -33,13 +31,11 @@ export const SelectRepository: React.FC<Props> = ({
|
||||
const router = useRouter();
|
||||
const { workspaceSlug } = router.query;
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
|
||||
const getKey = (pageIndex: number) => {
|
||||
if (!workspaceSlug || !integration) return;
|
||||
|
||||
return `${
|
||||
NEXT_PUBLIC_API_BASE_URL
|
||||
process.env.NEXT_PUBLIC_API_BASE_URL
|
||||
}/api/workspaces/${workspaceSlug}/workspace-integrations/${
|
||||
integration.id
|
||||
}/github-repositories/?page=${++pageIndex}`;
|
||||
|
||||
@@ -6,7 +6,6 @@ import { Controller, useForm } from "react-hook-form";
|
||||
// headless ui
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
// ui components
|
||||
import getConfig from "next/config";
|
||||
import {
|
||||
ToggleSwitch,
|
||||
PrimaryButton,
|
||||
@@ -64,11 +63,9 @@ export const PublishProjectModal: React.FC<Props> = observer(() => {
|
||||
const [isUnpublishing, setIsUnpublishing] = useState(false);
|
||||
const [isUpdateRequired, setIsUpdateRequired] = useState(false);
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_DEPLOY_URL } } = getConfig();
|
||||
const plane_deploy_url = process.env.NEXT_PUBLIC_DEPLOY_URL ?? "http://localhost:4000";
|
||||
|
||||
const plane_deploy_url = NEXT_PUBLIC_DEPLOY_URL ?? "http://localhost:4000";
|
||||
|
||||
const router = useRouter()
|
||||
const router = useRouter();
|
||||
const { workspaceSlug } = router.query;
|
||||
|
||||
const store: RootStore = useMobxStore();
|
||||
|
||||
@@ -8,8 +8,6 @@ import { Tooltip } from "components/ui";
|
||||
// hooks
|
||||
import useProjectDetails from "hooks/use-project-details";
|
||||
|
||||
import getConfig from "next/config";
|
||||
|
||||
type Props = {
|
||||
breadcrumbs?: JSX.Element;
|
||||
left?: JSX.Element;
|
||||
@@ -18,7 +16,7 @@ type Props = {
|
||||
noHeader: boolean;
|
||||
};
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_DEPLOY_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_DEPLOY_URL } = process.env;
|
||||
const plane_deploy_url = NEXT_PUBLIC_DEPLOY_URL ? NEXT_PUBLIC_DEPLOY_URL : "http://localhost:3001";
|
||||
|
||||
const Header: React.FC<Props> = ({ breadcrumbs, left, right, setToggleSidebar, noHeader }) => {
|
||||
|
||||
+4
-12
@@ -1,5 +1,4 @@
|
||||
// cookies
|
||||
import getConfig from "next/config";
|
||||
import { convertCookieStringToObject } from "./cookie";
|
||||
// types
|
||||
import type { IProjectMember, IUser, IWorkspace, IWorkspaceMember } from "types";
|
||||
@@ -10,9 +9,7 @@ export const requiredAuth = async (cookie?: string) => {
|
||||
|
||||
if (!token) return null;
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
|
||||
const baseUrl = NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
|
||||
let user: IUser | null = null;
|
||||
|
||||
@@ -44,9 +41,7 @@ export const requiredAdmin = async (workspaceSlug: string, projectId: string, co
|
||||
const cookies = convertCookieStringToObject(cookie);
|
||||
const token = cookies?.accessToken;
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
|
||||
const baseUrl = NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
|
||||
let memberDetail: IProjectMember | null = null;
|
||||
|
||||
@@ -80,9 +75,7 @@ export const requiredWorkspaceAdmin = async (workspaceSlug: string, cookie?: str
|
||||
const cookies = convertCookieStringToObject(cookie);
|
||||
const token = cookies?.accessToken;
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
|
||||
const baseUrl = NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
|
||||
let memberDetail: IWorkspaceMember | null = null;
|
||||
|
||||
@@ -126,8 +119,7 @@ export const homePageRedirect = async (cookie?: string) => {
|
||||
|
||||
let workspaces: IWorkspace[] = [];
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const baseUrl = NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
const baseUrl = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.plane.so";
|
||||
|
||||
const cookies = convertCookieStringToObject(cookie);
|
||||
const token = cookies?.accessToken;
|
||||
|
||||
@@ -9,10 +9,6 @@ const extraImageDomains = (process.env.NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS ?? "")
|
||||
const nextConfig = {
|
||||
reactStrictMode: false,
|
||||
swcMinify: true,
|
||||
publicRuntimeConfig: {
|
||||
NEXT_PUBLIC_DEPLOY_URL: process.env.NEXT_PUBLIC_DEPLOY_URL,
|
||||
NEXT_PUBLIC_API_BASE_URL: process.env.NEXT_PUBLIC_API_BASE_URL
|
||||
},
|
||||
images: {
|
||||
domains: [
|
||||
"vinci-web.s3.amazonaws.com",
|
||||
|
||||
+2
-7
@@ -2,7 +2,6 @@
|
||||
import Head from "next/head";
|
||||
import dynamic from "next/dynamic";
|
||||
import Router from "next/router";
|
||||
import App, { AppContext, AppProps } from 'next/app'
|
||||
|
||||
// themes
|
||||
import { ThemeProvider } from "next-themes";
|
||||
@@ -21,6 +20,8 @@ import NProgress from "nprogress";
|
||||
import { UserProvider } from "contexts/user.context";
|
||||
import { ToastContextProvider } from "contexts/toast.context";
|
||||
import { ThemeContextProvider } from "contexts/theme.context";
|
||||
// types
|
||||
import type { AppProps } from "next/app";
|
||||
// constants
|
||||
import { THEMES } from "constants/themes";
|
||||
// constants
|
||||
@@ -44,12 +45,6 @@ Router.events.on("routeChangeStart", NProgress.start);
|
||||
Router.events.on("routeChangeError", NProgress.done);
|
||||
Router.events.on("routeChangeComplete", NProgress.done);
|
||||
|
||||
MyApp.getInitialProps = async (appContext: AppContext) => {
|
||||
const appProps = await App.getInitialProps(appContext)
|
||||
|
||||
return { ...appProps }
|
||||
}
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
return (
|
||||
// <UserProvider>
|
||||
|
||||
+3
-8
@@ -29,7 +29,6 @@ import { useMobxStore } from "lib/mobx/store-provider";
|
||||
// next themes
|
||||
import { useTheme } from "next-themes";
|
||||
import { IUser } from "types";
|
||||
import getConfig from "next/config";
|
||||
|
||||
// types
|
||||
type EmailPasswordFormValues = {
|
||||
@@ -42,10 +41,6 @@ const HomePage: NextPage = observer(() => {
|
||||
const store: any = useMobxStore();
|
||||
const { setTheme } = useTheme();
|
||||
|
||||
const {
|
||||
publicRuntimeConfig: { NEXT_PUBLIC_ENABLE_OAUTH },
|
||||
} = getConfig()
|
||||
|
||||
const { isLoading, mutateUser } = useUserAuth("sign-in");
|
||||
|
||||
const { setToastAlert } = useToast();
|
||||
@@ -178,10 +173,10 @@ const HomePage: NextPage = observer(() => {
|
||||
</>
|
||||
<div className="grid place-items-center h-full overflow-y-auto py-5 px-7">
|
||||
<div>
|
||||
{parseInt(NEXT_PUBLIC_ENABLE_OAUTH || "0") ? (
|
||||
{parseInt(process.env.NEXT_PUBLIC_ENABLE_OAUTH || "0") ? (
|
||||
<>
|
||||
<h1 className="text-center text-2xl sm:text-2.5xl font-semibold text-custom-text-100">
|
||||
{ `Sign in to Plane` }
|
||||
Sign in to Plane
|
||||
</h1>
|
||||
<div className="flex flex-col divide-y divide-custom-border-200">
|
||||
<div className="pb-7">
|
||||
@@ -197,7 +192,7 @@ const HomePage: NextPage = observer(() => {
|
||||
<EmailPasswordForm onSubmit={handlePasswordSignIn} />
|
||||
)}
|
||||
|
||||
{parseInt(NEXT_PUBLIC_ENABLE_OAUTH || "0") ? (
|
||||
{parseInt(process.env.NEXT_PUBLIC_ENABLE_OAUTH || "0") ? (
|
||||
<p className="pt-16 text-custom-text-200 text-sm text-center">
|
||||
By signing up, you agree to the{" "}
|
||||
<a
|
||||
|
||||
@@ -19,7 +19,6 @@ import { Input, PrimaryButton, Spinner } from "components/ui";
|
||||
import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png";
|
||||
// types
|
||||
import type { NextPage } from "next";
|
||||
import getConfig from "next/config";
|
||||
|
||||
type FormData = {
|
||||
password: string;
|
||||
@@ -29,8 +28,6 @@ type FormData = {
|
||||
const ResetPasswordPage: NextPage = () => {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_ENABLE_OAUTH } } = getConfig();
|
||||
|
||||
const router = useRouter();
|
||||
const { uidb64, token } = router.query;
|
||||
|
||||
@@ -88,7 +85,7 @@ const ResetPasswordPage: NextPage = () => {
|
||||
}, [setTheme]);
|
||||
|
||||
useEffect(() => {
|
||||
if (parseInt(NEXT_PUBLIC_ENABLE_OAUTH || "0")) router.push("/");
|
||||
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_OAUTH || "0")) router.push("/");
|
||||
else setIsLoading(false);
|
||||
}, [router]);
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import { EmailPasswordForm } from "components/account";
|
||||
import { Spinner } from "components/ui";
|
||||
// images
|
||||
import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png";
|
||||
import getConfig from "next/config";
|
||||
// types
|
||||
import type { NextPage } from "next";
|
||||
type EmailPasswordFormValues = {
|
||||
@@ -30,8 +29,6 @@ type EmailPasswordFormValues = {
|
||||
const SignUp: NextPage = () => {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_ENABLE_OAUTH } } = getConfig();
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const { setToastAlert } = useToast();
|
||||
@@ -74,7 +71,7 @@ const SignUp: NextPage = () => {
|
||||
}, [setTheme]);
|
||||
|
||||
useEffect(() => {
|
||||
if (parseInt(NEXT_PUBLIC_ENABLE_OAUTH || "0")) router.push("/");
|
||||
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_OAUTH || "0")) router.push("/");
|
||||
else setIsLoading(false);
|
||||
}, [router]);
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
// services
|
||||
import getConfig from "next/config";
|
||||
import APIService from "services/api.service";
|
||||
import trackEventServices from "services/track-event.service";
|
||||
|
||||
// types
|
||||
import { ICurrentUserResponse, IGptResponse } from "types";
|
||||
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -9,8 +9,7 @@ import {
|
||||
ISaveAnalyticsFormData,
|
||||
} from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
class AnalyticsServices extends APIService {
|
||||
constructor() {
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import axios from "axios";
|
||||
import APIService from "services/api.service";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
class AppInstallationsService extends APIService {
|
||||
constructor() {
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import APIService from "services/api.service";
|
||||
import { ICurrentUserResponse } from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
class AuthService extends APIService {
|
||||
constructor() {
|
||||
|
||||
@@ -5,8 +5,7 @@ import trackEventServices from "services/track-event.service";
|
||||
// types
|
||||
import type { CycleDateCheckData, ICurrentUserResponse, ICycle, IIssue } from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -4,8 +4,7 @@ import APIService from "services/api.service";
|
||||
import type { ICurrentUserResponse, IEstimate, IEstimateFormData } from "types";
|
||||
import trackEventServices from "services/track-event.service";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// services
|
||||
import APIService from "services/api.service";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
interface UnSplashImage {
|
||||
id: string;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import APIService from "services/api.service";
|
||||
import trackEventServices from "services/track-event.service";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -3,8 +3,7 @@ import trackEventServices from "services/track-event.service";
|
||||
|
||||
import { ICurrentUserResponse } from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -3,8 +3,7 @@ import trackEventServices from "services/track-event.service";
|
||||
|
||||
import { ICurrentUserResponse, IGithubRepoInfo, IGithubServiceImportFormData } from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -10,8 +10,7 @@ import {
|
||||
IExportServiceResponse,
|
||||
} from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -4,8 +4,7 @@ import trackEventServices from "services/track-event.service";
|
||||
// types
|
||||
import { IJiraMetadata, IJiraResponse, IJiraImporterForm, ICurrentUserResponse } from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -12,8 +12,7 @@ import type {
|
||||
ISubIssueResponse,
|
||||
} from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -5,8 +5,7 @@ import trackEventServices from "./track-event.service";
|
||||
// types
|
||||
import type { IIssueViewOptions, IModule, IIssue, ICurrentUserResponse } from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// services
|
||||
import APIService from "services/api.service";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
// types
|
||||
import type {
|
||||
|
||||
@@ -5,8 +5,7 @@ import trackEventServices from "services/track-event.service";
|
||||
// types
|
||||
import { IPage, IPageBlock, RecentPagesResponse, IIssue, ICurrentUserResponse } from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -5,8 +5,7 @@ import trackEventServices from "services/track-event.service";
|
||||
import { ICurrentUserResponse } from "types";
|
||||
import { IProjectPublishSettings } from "store/project-publish";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -16,8 +16,7 @@ import type {
|
||||
TProjectIssuesSearchParams,
|
||||
} from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -11,8 +11,7 @@ import type {
|
||||
IssueCommentReactionForm,
|
||||
} from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import APIService from "services/api.service";
|
||||
import trackEventServices from "services/track-event.service";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -12,8 +12,7 @@ import type {
|
||||
IUserWorkspaceDashboard,
|
||||
} from "types";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -6,8 +6,7 @@ import { ICurrentUserResponse } from "types";
|
||||
// types
|
||||
import { IView } from "types/views";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import APIService from "services/api.service";
|
||||
import trackEventServices from "services/track-event.service";
|
||||
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig: { NEXT_PUBLIC_API_BASE_URL } } = getConfig();
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
// types
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user