Skip to content

Commit

Permalink
Remove mock data from the RSE page
Browse files Browse the repository at this point in the history
  • Loading branch information
MytsV committed Aug 8, 2024
1 parent 0779bf4 commit 6242914
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/app/(rucio)/rse/page/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { PageRSE as PageRSEStory } from "@/component-library/Pages/RSE/PageRSE";
import { RSEBlockState } from "@/lib/core/entity/rucio";
import { RSEAttributeViewModel, RSEProtocolViewModel, RSEViewModel } from "@/lib/infrastructure/data/view-model/rse";
import { useEffect, useState } from "react";
import { fixtureRSEViewModel, mockUseComDOM } from "test/fixtures/table-fixtures";
import { fixtureRSEProtocolViewModel, fixtureRSEAttributeViewModel } from "test/fixtures/table-fixtures";
import { getAttributes, getProtocols, getRSE } from "../../queries";

export default function Page({ params }: { params: { name: string } }) {
Expand All @@ -14,19 +12,19 @@ export default function Page({ params }: { params: { name: string } }) {
const [attributes, setAttributes] = useState<RSEAttributeViewModel>({status: "pending"} as RSEAttributeViewModel)
useEffect(() => {
getRSE(params.name).then(setRSE)
}, [])
}, [params.name])
useEffect(() => {
getProtocols(params.name).then(setProtocols)
}, [])
}, [params.name])
useEffect(() => {
getAttributes(params.name).then(setAttributes)
}, [])
}, [params.name])
if (rse.status === "pending" || protocols.status === "pending" || attributes.status === "pending") {
return <Loading title="View RSE" subtitle={`For RSE ${params.name}`}/>
}
return (
<PageRSEStory
rse={{ ...fixtureRSEViewModel(), name: params.name }}
rse={rse}
rseblockstate={0 as RSEBlockState}
protocols={protocols}
attributes={attributes}
Expand Down

0 comments on commit 6242914

Please sign in to comment.