forked from github-starred/komodo
rm conditonal hook call, make consistent
This commit is contained in:
@@ -93,8 +93,8 @@ export const AlerterConfig = ({ id }: { id: string }) => {
|
||||
|
||||
export const AlerterPage = () => {
|
||||
const id = useParams().alerterId;
|
||||
if (!id) return null;
|
||||
useAddRecentlyViewed("Alerter", id);
|
||||
if (!id) return null;
|
||||
|
||||
return (
|
||||
<Resource
|
||||
|
||||
@@ -31,8 +31,8 @@ export const BuildCard = ({ id }: { id: string }) => {
|
||||
|
||||
export const BuildPage = () => {
|
||||
const id = useParams().buildId;
|
||||
if (!id) return null;
|
||||
useAddRecentlyViewed("Build", id);
|
||||
if (!id) return null;
|
||||
|
||||
return (
|
||||
<Resource
|
||||
|
||||
@@ -40,9 +40,8 @@ export const BuilderCard = ({ id }: { id: string }) => {
|
||||
|
||||
export const BuilderPage = () => {
|
||||
const id = useParams().builderId;
|
||||
|
||||
if (!id) return null;
|
||||
useAddRecentlyViewed("Builder", id);
|
||||
if (!id) return null;
|
||||
|
||||
return (
|
||||
<Resource title={<BuilderName id={id} />} info={<></>} actions={<></>}>
|
||||
|
||||
@@ -37,8 +37,8 @@ export const DeploymentCard = ({ id }: { id: string }) => {
|
||||
|
||||
export const DeploymentPage = () => {
|
||||
const id = useParams().deploymentId;
|
||||
if (!id) return null;
|
||||
useAddRecentlyViewed("Deployment", id);
|
||||
if (!id) return null;
|
||||
|
||||
return (
|
||||
<Resource
|
||||
|
||||
@@ -14,8 +14,8 @@ export const RepoName = ({ id }: { id: string }) => {
|
||||
|
||||
export const RepoPage = () => {
|
||||
const id = useParams().repoId;
|
||||
if (!id) return null;
|
||||
useAddRecentlyViewed("Repo", id);
|
||||
if (!id) return null;
|
||||
|
||||
return (
|
||||
<Page title="Repo" subtitle="" actions="">
|
||||
|
||||
@@ -72,9 +72,8 @@ const ServerConfig = ({ id }: { id: string }) => {
|
||||
|
||||
export const ServerPage = () => {
|
||||
const id = useParams().serverId;
|
||||
|
||||
if (!id) return null;
|
||||
useAddRecentlyViewed("Server", id);
|
||||
if (!id) return null;
|
||||
|
||||
return (
|
||||
<Resource
|
||||
|
||||
Reference in New Issue
Block a user