Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
C
ctas-box
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fachri
ctas-box
Commits
303f21d3
Commit
303f21d3
authored
Oct 14, 2025
by
Rais Aryaguna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: Remove unused invariant checks and update route paths for consistency
parent
5f90212d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
35 deletions
+6
-35
package.json
package.json
+0
-1
src/global-config.ts
src/global-config.ts
+0
-28
src/routes/paths.ts
src/routes/paths.ts
+6
-6
No files found.
package.json
View file @
303f21d3
...
...
@@ -114,7 +114,6 @@
"
sonner
"
:
"
^2.0.7
"
,
"
stylis
"
:
"
^4.3.6
"
,
"
swr
"
:
"
^2.3.4
"
,
"
tiny-invariant
"
:
"
^1.3.3
"
,
"
turndown
"
:
"
^7.2.0
"
,
"
yet-another-react-lightbox
"
:
"
^3.25.0
"
,
"
zod
"
:
"
^4.0.15
"
...
...
src/global-config.ts
View file @
303f21d3
import
{
paths
}
from
'
src/routes/paths
'
;
import
invariant
from
'
tiny-invariant
'
;
import
packageJson
from
'
../package.json
'
;
// ----------------------------------------------------------------------
function
isValidUrl
(
url
:
string
):
boolean
{
try
{
new
URL
(
url
);
// The `URL` constructor throws if the string is not a valid URL.
return
true
;
}
catch
{
return
false
;
}
}
invariant
(
import
.
meta
.
env
.
VITE_HOST_API
&&
isValidUrl
(
import
.
meta
.
env
.
VITE_HOST_API
),
'
VITE_HOST_API env is not exist or invalid
'
);
invariant
(
import
.
meta
.
env
.
VITE_HOST_API_JAVA
&&
isValidUrl
(
import
.
meta
.
env
.
VITE_HOST_API_JAVA
),
'
VITE_HOST_API_JAVA env is not exist or invalid
'
);
invariant
(
process
.
env
.
VITE_PORT_JAVA_PPH21
,
'
VITE_PORT_JAVA_PPH21 env is not exist or invalid
'
);
invariant
(
process
.
env
.
VITE_PORT_JAVA_CETAK
,
'
VITE_PORT_JAVA_CETAK env is not exist or invalid
'
);
invariant
(
process
.
env
.
VITE_USERNAME_JAVA
,
'
VITE_USERNAME_JAVA env is not exist or invalid
'
);
invariant
(
process
.
env
.
VITE_PASSWORD_JAVA
,
'
VITE_PASSWORD_JAVA env is not exist or invalid
'
);
// ----------------------------------------------------------------------
export
type
ConfigValue
=
{
appName
:
string
;
appVersion
:
string
;
...
...
src/routes/paths.ts
View file @
303f21d3
...
...
@@ -110,16 +110,16 @@ export const paths = {
root
:
ROOTS
.
PPH21
,
bulanan
:
`
${
ROOTS
.
PPH21
}
/bulanan`
,
bulananRekam
:
`
${
ROOTS
.
PPH21
}
/bulanan/rekam`
,
bulananUbah
:
(
id
:
string
)
=>
`/bulanan/
${
id
}
/ubah`
,
bulananPengganti
:
(
id
:
string
)
=>
`/bulanan/
${
id
}
/pengganti`
,
bulananUbah
:
(
id
:
string
)
=>
`
${
ROOTS
.
PPH21
}
/bulanan/
${
id
}
/ubah`
,
bulananPengganti
:
(
id
:
string
)
=>
`
${
ROOTS
.
PPH21
}
/bulanan/
${
id
}
/pengganti`
,
bupotFinal
:
`
${
ROOTS
.
PPH21
}
/bupot-final`
,
detailsBupotFinal
:
(
id
:
string
)
=>
`/bupot-final/
${
id
}
`
,
detailsBupotFinal
:
(
id
:
string
)
=>
`
${
ROOTS
.
PPH21
}
/bupot-final/
${
id
}
`
,
tahuan
:
`
${
ROOTS
.
PPH21
}
/tahunan`
,
detailstahuan
:
(
id
:
string
)
=>
`/tahunan/
${
id
}
`
,
detailstahuan
:
(
id
:
string
)
=>
`
${
ROOTS
.
PPH21
}
/tahunan/
${
id
}
`
,
tahunanA2
:
`
${
ROOTS
.
PPH21
}
/tahunan-a2`
,
detailstahunanA2
:
(
id
:
string
)
=>
`/tahunan-a2/
${
id
}
`
,
detailstahunanA2
:
(
id
:
string
)
=>
`
${
ROOTS
.
PPH21
}
/tahunan-a2/
${
id
}
`
,
bupot26
:
`
${
ROOTS
.
PPH21
}
/bupot-26`
,
detailsbupot26
:
(
id
:
string
)
=>
`/bupot-26/
${
id
}
`
,
detailsbupot26
:
(
id
:
string
)
=>
`
${
ROOTS
.
PPH21
}
/bupot-26/
${
id
}
`
,
},
// DASHBOARD
dashboard
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment