Skip to content

Commit

Permalink
fix: solve the wrong profileName use in edit page(typo as name, shoul…
Browse files Browse the repository at this point in the history
…d be profileName)
  • Loading branch information
Alonza0314 committed Nov 1, 2024
1 parent 1ae9d70 commit c652150
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/pages/ProfileCreate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ function ProfileCreate() {
const { profileName } = useParams<{ profileName: string }>();

const isNewProfile = profileName === undefined;
console.log("trace: name", name);
console.log("trace: isNewProfile", isNewProfile);
const navigation = useNavigate();
const [loading, setLoading] = useState(false);

Expand All @@ -39,7 +37,7 @@ function ProfileCreate() {
setLoading(true);

axios
.get("/api/profile/" + name)
.get("/api/profile/" + profileName)
.then((res) => {
const profileMapper = new ProfileMapperImpl(new FlowsMapperImpl());
const profile = profileMapper.mapFromProfile(res.data);
Expand All @@ -48,7 +46,7 @@ function ProfileCreate() {
.finally(() => {
setLoading(false);
});
}, [name]);
}, [profileName]);
}

if (loading) {
Expand Down

0 comments on commit c652150

Please sign in to comment.