Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NEXT_PUBLIC_FEATURE_AUTH=boolean
NEXT_PUBLIC_DISABLE_AUTH=boolean
NEXT_PUBLIC_FEATURE_PROJECTS=boolean
NEXT_PUBLIC_FEATURE_TASKS=boolean
NEXT_PUBLIC_FEATURE_SPRINTS=boolean
NEXT_PUBLIC_FEATURE_TEAM_SETTINGS=boolean

NEXT_PUBLIC_API_URL=http://адрес_бекенда:порт(по умолчанию localhost:3000)
7 changes: 1 addition & 6 deletions apps/web/app/(auth)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import Link from 'next/link'
import { notFound } from 'next/navigation'

import { FEATURES, ROUTES } from '@/shared/config'
import { ROUTES } from '@/shared/config'

interface Props {
children: React.ReactNode
}

export default function AuthLayout({ children }: Props) {
if (!FEATURES.AUTH) {
notFound()
}

return (
<div className='relative min-h-screen overflow-hidden bg-background text-foreground'>
<div className='pointer-events-none absolute inset-0'>
Expand Down
2 changes: 0 additions & 2 deletions apps/web/shared/config/feature-flags.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export const FEATURES = {
AUTH: process.env.NEXT_PUBLIC_FEATURE_AUTH === 'true',
AUTH_DISABLE: process.env.NEXT_PUBLIC_DISABLE_AUTH === 'true',
PROJECTS: process.env.NEXT_PUBLIC_FEATURE_PROJECTS === 'true',
TASKS: process.env.NEXT_PUBLIC_FEATURE_TASKS === 'true',
SPRINTS: process.env.NEXT_PUBLIC_FEATURE_SPRINTS === 'true',
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"globalDependencies": ["**/.env.*local"],
"globalEnv": [
"DATABASE_URL",
"NEXT_PUBLIC_FEATURE_AUTH",
"NEXT_PUBLIC_API_URL",
"NEXT_PUBLIC_FEATURE_PROJECTS",
"NEXT_PUBLIC_FEATURE_TASKS",
"NEXT_PUBLIC_FEATURE_SPRINTS",
Expand Down
Loading